/* Casino Royal v0.1.3. Compact, mobile-first layout. Flat surfaces; no gold, gradients or external fonts. */
:root {
  color-scheme: dark;
  --background: #040c1b;
  --surface: #091629;
  --field: #061121;
  --selected: #1d5f9f;
  --line: #1c2b41;
  --line-strong: #3b5878;
  --blue: #2463ad;
  --blue-hover: #2d70c0;
  --text: #f1f5fb;
  --muted: #97a8c0;
  --quiet: #8092ac;
  --error: #ffb4b4;
  --focus: #8bbbfa;
  --control-height: 50px;
  --field-gap: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--background); scroll-padding-block: 16px; }
body { margin: 0; min-height: 100vh; min-height: 100svh; background: var(--background); color: var(--text); font-size: 15px; }
button, input, textarea, select { font: inherit; scroll-margin-block: 16px; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; touch-action: manipulation; }
button, input, textarea, select, label { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
svg { stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.shell { width: min(100% - 32px, 420px); margin: 0 auto; padding-top: max(20px, env(safe-area-inset-top)); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
.brand { display: flex; justify-content: center; margin: 0 0 18px; background: var(--background); isolation: isolate; }
.brand img { display: block; width: 232px; max-width: 84%; height: auto; object-fit: contain; user-select: none;
  /* Preserve the supplied logo file. Map its #222 backdrop to black, then blend it out. */
  }
.upload-panel { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.categories { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 16px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); min-width: 0; }
.category { position: relative; min-width: 0; cursor: pointer; }
.category input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.category-face { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 30px 0 12px; border: 1px solid transparent; border-radius: 6px; color: #aebdd0; font-weight: 600; font-size: 15px; transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease; }
.category-face svg { width: 18px; height: 18px; }
.category input:checked + .category-face { background: var(--selected); border-color: #4d8dcc; color: #fff; }
.category input:checked + .category-face::after { content: "✓"; position: absolute; right: 11px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid rgba(255,255,255,.72); border-radius: 50%; color: #fff; font-size: 11px; line-height: 1; font-weight: 700; }
.category input:focus-visible + .category-face { outline: 2px solid var(--focus); outline-offset: 3px; }
.categories:disabled .category { cursor: default; }
.username-field > label, .field-label { display: block; font-size: 14px; line-height: 19px; color: #e3ebf5; font-weight: 500; margin: 0 0 6px; }
#username, #full-name, #message, #amount, #payment-method { width: 100%; min-width: 0; height: var(--control-height); padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); background: var(--field); font-size: 16px; line-height: 24px; outline: none; transition: border-color 140ms ease; }
#username::placeholder, #full-name::placeholder, #message::placeholder, #amount::placeholder { color: var(--quiet); font-size: 14px; }
#username:focus, #full-name:focus, #message:focus, #amount:focus, #payment-method:focus { border-color: var(--focus); }
#username[aria-invalid="true"], #full-name[aria-invalid="true"], #message[aria-invalid="true"], #amount[aria-invalid="true"], #payment-method[aria-invalid="true"] { border-color: var(--error); }
#username:disabled, #full-name:disabled, #message:disabled, #amount:disabled, #payment-method:disabled { opacity: .7; -webkit-text-fill-color: var(--text); }
#username:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 1000px var(--field) inset; caret-color: var(--text); }
.file-field, .message-field, .receipt-fields { margin-top: var(--field-gap); }
.receipt-fields { border: 0; padding: 0; min-width: 0; margin-inline: 0; margin-bottom: 0; }
.receipt-field + .receipt-field { margin-top: var(--field-gap); }
.select-wrap { position: relative; }
#payment-method { appearance: none; -webkit-appearance: none; padding-right: 42px; text-overflow: ellipsis; }
#payment-method:invalid { color: var(--quiet); }
#payment-method option { color: var(--text); background: var(--field); }
.select-wrap > svg { position: absolute; right: 14px; top: calc((var(--control-height) - 18px) / 2); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
#amount { font-variant-numeric: tabular-nums; }
.message-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.message-heading .field-label { margin-bottom: 0; }
.optional-hint { color: #9eb0c8; font-size: 12px; line-height: 18px; font-weight: 400; }
#message { display: block; height: var(--control-height); min-height: var(--control-height); max-height: 144px; padding: 12px 13px; resize: none; overflow-y: auto; overflow-wrap: anywhere; }
.drop-zone { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 80px; margin: 0; padding: 14px; border: 1px solid #354b68; border-radius: 8px; background: var(--field); color: var(--text); transition: background-color 140ms ease, border-color 140ms ease; }
.upload-glyph { display: flex; align-items: center; justify-content: center; width: 28px; height: 32px; flex: 0 0 28px; color: #a4bfe0; }
.choose-copy { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; text-align: left; }
.choose-chevron { width: 18px; height: 18px; color: var(--muted); }
.upload-glyph svg { width: 28px; height: 28px; }
.choose-title { font-size: 14px; line-height: 22px; font-weight: 600; }
.choose-hint { margin-top: 0; color: #a5b5c9; font-size: 13px; line-height: 18px; }
.add-glyph { display: none; width: 18px; height: 18px; }
.drop-zone.is-dragging { border-color: var(--focus); background: #102541; }
.drop-zone.has-files { justify-content: center; gap: 8px; min-height: 48px; padding: 10px 12px; }
.drop-zone.has-files .choose-copy { flex: 0 1 auto; }
.drop-zone.has-files .upload-glyph, .drop-zone.has-files .choose-hint, .drop-zone.has-files .choose-chevron { display: none; }
.drop-zone.has-files .add-glyph { display: block; order: -1; }
.drop-zone:disabled { opacity: .55; }
.drop-zone[aria-invalid="true"] { border-color: var(--error); }
.file-limits { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; color: #9eafc5; font-size: 12px; line-height: 17px; }
.file-list { list-style: none; padding: 0; margin: 8px 0 0; }
.file-row { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: none; }
.file-thumb { width: 42px; height: 46px; flex: 0 0 42px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid #253b58; border-radius: 5px; color: #a4bfe0; background: #10213a; }
.file-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.file-thumb svg { width: 22px; height: 22px; }
.file-copy { flex: 1; min-width: 0; }
.file-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e8edf7; font-size: 13px; line-height: 19px; }
.file-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 17px; }
.remove-file { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; flex: 0 0 44px; border: none; border-radius: 6px; color: var(--muted); background: transparent; }
.remove-file svg { width: 18px; height: 18px; }
.selection-summary { margin: 6px 0 0; color: var(--quiet); font-size: 12px; line-height: 17px; text-align: right; }
.field-error { margin: 6px 0 0; color: var(--error); font-size: 12px; line-height: 19px; overflow-wrap: anywhere; }
.submit-button { display: flex; width: 100%; min-height: 52px; justify-content: center; align-items: center; gap: 9px; padding: 12px 18px; border: 1px solid transparent; border-radius: 8px; margin-top: 18px; background: var(--blue); color: #fff; font-size: 15px; line-height: 22px; font-weight: 600; transition: background-color 140ms ease; }
.submit-button svg { width: 19px; height: 19px; }
.submit-button:disabled { opacity: .72; }
.submit-button.secondary { background: #122947; border-color: #2a4668; }
button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.progress-block { margin-top: 16px; }
.progress-caption { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; line-height: 18px; margin-bottom: 10px; }
progress { display: block; width: 100%; height: 4px; overflow: hidden; border: none; border-radius: 3px; appearance: none; background: var(--line); color: #22c55e; }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: #22c55e; }
progress::-moz-progress-bar { background: #22c55e; }
.result { padding-top: 12px; padding-bottom: 3px; text-align: center; outline: none; }
.result-mark { display: grid; place-items: center; width: 56px; height: 56px; margin: 3px auto 20px; border-radius: 50%; border: 1px solid #375d89; background: #102a4a; color: #c9e0fc; }
.result-mark svg { width: 32px; height: 32px; stroke-width: 1.8; }
.result h2 { margin: 0; font-size: 18px; line-height: 26px; font-weight: 600; letter-spacing: -.2px; }
.result > p { margin: 9px 0 26px; font-size: 13px; line-height: 21px; color: var(--muted); }
.result-details { margin: 0; padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result-details > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: 12px; line-height: 18px; }
.result-details > div + div { padding-top: 0; }
.result-details dt { color: var(--muted); }
.result-details dd { margin: 0; color: var(--text); min-width: 0; max-width: 65%; text-align: right; overflow-wrap: anywhere; }
.result-message dd { max-width: none; text-align: left; }
.result-details .result-message { display: block; text-align: left; }
.result-message dd { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 170px; overflow-y: auto; }
.preview-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 12px 0 0; color: var(--quiet); font-size: 11px; line-height: 18px; text-align: center; }
.preview-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--quiet); }
.no-script { color: var(--error); font-size: 13px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (hover: hover) {
  .drop-zone:hover:not(:disabled) { background: #0b1c32; border-color: #6b90bc; }
  .submit-button:hover:not(:disabled) { background: var(--blue-hover); }
  .submit-button.secondary:hover { background: #1a375b; }
  .remove-file:hover:not(:disabled) { background: #192d47; color: var(--text); }
  .category:hover .category-face { color: var(--text); }
}
@media (min-width: 700px) { .shell { padding-top: 40px; } .upload-panel { padding: 24px; } .brand { margin-bottom: 22px; } }
@media (max-width: 350px) { .shell { width: calc(100% - 28px); } .upload-panel { padding: 16px; } .category-face { gap: 7px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Dekont formu: mobil dikey alan optimizasyonu */
.receipt-fields {
  margin-top: 12px;
}

.receipt-field + .receipt-field {
  margin-top: 10px;
}

.receipt-field .field-label {
  margin-bottom: 4px;
}

/* Gercek telefonlar icin kompakt mobil ergonomi */
@media (max-width: 480px) {
  :root {
    --control-height: 46px;
    --field-gap: 10px;
  }

  .shell {
    width: calc(100% - 24px);
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: max(34px, env(safe-area-inset-bottom));
  }

  .brand {
    margin-bottom: 14px;
  }

  .brand img {
    width: 218px;
  }

  .upload-panel {
    padding: 16px;
  }

  .categories {
    margin-bottom: 12px;
  }

  .category-face {
    min-height: 44px;
  }

  .username-field > label,
  .field-label {
    margin-bottom: 4px;
  }

  .receipt-fields {
    margin-top: 10px;
  }

  .receipt-field + .receipt-field {
    margin-top: 8px;
  }

  .drop-zone {
    min-height: 68px;
    padding: 10px 12px;
  }

  .file-limits {
    margin-top: 6px;
  }

  .message-heading {
    margin-bottom: 4px;
  }

  #message {
    min-height: 46px;
    height: 46px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .submit-button {
    min-height: 50px;
  }
}

/* Final renk rötuşları */

/* Başarı işareti: canlı fakat düz/profesyonel */
.result-mark {
  color: #22c55e;
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.10);
}

.result-mark svg {
  stroke: #22c55e;
}

/* Başarı ekranındaki yeni gönderim aksiyonu */
#reset-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #feb506;
  border-color: #feb506;
  color: #07111f;
  font-weight: 700;
  text-decoration: none;
}

@media (hover: hover) {
  #reset-button:hover {
    background: #ffc329;
    border-color: #ffc329;
    color: #07111f;
  }
}

#reset-button:focus-visible {
  outline: 2px solid #ffe28a;
  outline-offset: 3px;
}
