/* 7 Lucky Ducks — player portal
   Design targets: casino energy, but the logged-in state must present at most
   two decisions. Everything is sized for a thumb on a phone. */

:root {
  --bg:        #0a0612;
  --bg-2:      #150b28;
  --surface:   rgba(255, 255, 255, .045);
  --line:      rgba(255, 201, 60, .16);
  --text:      #F6F1FF;
  --muted:     #9d92b8;

  --gold-1:    #FFE082;
  --gold-2:    #FFC93C;
  --gold-3:    #F09819;
  --cyan:      #35E7FF;
  --cyan-deep: #0C93B8;
  --green:     #2BE08A;
  --red:       #FF5A7A;

  --r:         18px;
  --shadow:    0 18px 50px rgba(0,0,0,.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  background: radial-gradient(1200px 700px at 50% -10%, var(--bg-2) 0%, var(--bg) 60%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
  padding: max(20px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  display: flex; justify-content: center;
}

/* ---- ambient glow. Cheap depth, no images to load. ---- */
.glow { position: fixed; border-radius: 50%; filter: blur(90px); opacity: .5;
        pointer-events: none; z-index: 0; }
.glow-a { width: 60vw; height: 60vw; max-width: 480px; max-height: 480px;
          top: -14%; left: -18%;
          background: radial-gradient(circle, rgba(255,201,60,.45), transparent 70%);
          animation: drift 18s ease-in-out infinite; }
.glow-b { width: 55vw; height: 55vw; max-width: 420px; max-height: 420px;
          bottom: -12%; right: -16%;
          background: radial-gradient(circle, rgba(53,231,255,.30), transparent 70%);
          animation: drift 22s ease-in-out infinite reverse; }
@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(6%, 5%) scale(1.12); }
}
@media (prefers-reduced-motion: reduce) { .glow { animation: none; } }

.view { position: relative; z-index: 1; width: 100%; max-width: 440px;
        display: flex; flex-direction: column; gap: 22px; }

/* ================= BRAND ================= */
.brand { text-align: center; padding-top: 6vh; }

.brand-mark {
  font-size: 68px; font-weight: 900; line-height: 1;
  background: linear-gradient(160deg, var(--gold-1), var(--gold-2) 45%, var(--gold-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 22px rgba(255,201,60,.35));
  display: inline-flex; align-items: center; gap: 4px;
}
.brand-mark .duck { font-size: 54px; -webkit-text-fill-color: initial; filter: none; }

.wordmark {
  margin-top: 6px;
  font-size: clamp(44px, 15vw, 62px); font-weight: 900;
  letter-spacing: -.03em; line-height: .88;
  background: linear-gradient(180deg, #fff 0%, var(--gold-2) 70%, var(--gold-3) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline { margin-top: 14px; color: var(--muted); font-size: 17px; }

/* ================= LAYOUT BITS ================= */
.stack { display: flex; flex-direction: column; gap: 12px; }
.head  { font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.sub   { color: var(--muted); margin-top: -14px; }
.section-head { font-size: 13px; font-weight: 700; letter-spacing: .12em;
                text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
  backdrop-filter: blur(8px);
}

.perks { list-style: none; display: flex; justify-content: center; flex-wrap: wrap;
         gap: 8px 18px; color: var(--muted); font-size: 14px; margin-top: 4px; }
.perks b { color: var(--gold-2); }

/* ================= BUTTONS ================= */
.btn {
  appearance: none; border: 0; cursor: pointer;
  font-family: inherit; font-weight: 800; letter-spacing: .04em;
  border-radius: 14px; padding: 17px 22px; font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  min-height: 56px;   /* thumb-sized, always */
}
.btn:active { transform: translateY(2px) scale(.985); }

.btn-xl { font-size: 19px; padding: 20px 24px; min-height: 62px; }

.btn-gold {
  color: #2A1B00;
  background: linear-gradient(170deg, var(--gold-1), var(--gold-2) 55%, var(--gold-3));
  box-shadow: 0 10px 26px rgba(255,183,0,.32), inset 0 1px 0 rgba(255,255,255,.55);
}
.btn-gold:hover { filter: brightness(1.06); }

.btn-cyan {
  color: #00232C;
  background: linear-gradient(170deg, #9DF5FF, var(--cyan) 55%, var(--cyan-deep));
  box-shadow: 0 10px 26px rgba(53,231,255,.28), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn-cyan:hover { filter: brightness(1.06); }

.btn-ghost {
  background: transparent; color: var(--muted);
  border: 1px solid rgba(255,255,255,.14);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,.3); }

.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-ico { font-size: 22px; line-height: 1; }

.back, .linkbtn {
  background: none; border: 0; color: var(--muted); font: inherit;
  cursor: pointer; padding: 4px 0; align-self: flex-start;
}
.back:hover, .linkbtn:hover { color: var(--text); }

/* ================= FORM ================= */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 14px; color: var(--muted); font-weight: 600; }
.field em { font-style: normal; opacity: .7; font-weight: 400; }

input[type=text], input[type=password], input[type=tel] {
  width: 100%; font: inherit; font-size: 17px;   /* 17px: iOS zooms below 16 */
  color: var(--text); background: rgba(0,0,0,.32);
  border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
  padding: 15px 16px; min-height: 54px;
}
input:focus { outline: 2px solid var(--gold-2); outline-offset: 1px;
              border-color: transparent; }
input::placeholder { color: #6d6486; }

.err { color: var(--red); font-size: 15px; font-weight: 600; }

/* ================= LOGGED-IN HOME ================= */
.topbar { display: flex; justify-content: space-between; align-items: center; }
.hello { color: var(--muted); }
.hello b { color: var(--text); }

.balance {
  text-align: center; padding: 30px 20px;
  background: linear-gradient(165deg, rgba(255,201,60,.13), rgba(255,255,255,.03));
  border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow);
}
.balance-label { font-size: 12px; font-weight: 800; letter-spacing: .18em;
                 color: var(--gold-2); }
.balance-amount {
  margin-top: 8px;
  font-size: clamp(46px, 15vw, 64px); font-weight: 900; letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, var(--gold-2) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 20px rgba(255,201,60,.3));
}

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ================= TX LIST ================= */
.txlist { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.tx {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 14px 16px;
}
.tx-ico { width: 34px; height: 34px; flex: none; border-radius: 10px;
          display: grid; place-items: center; font-weight: 900; font-size: 17px; }
.tx-load   { background: rgba(43,224,138,.14); color: var(--green); }
.tx-redeem { background: rgba(53,231,255,.14); color: var(--cyan); }
.tx-adjust { background: rgba(255,201,60,.14); color: var(--gold-2); }
.tx-body { flex: 1; min-width: 0; }
.tx-kind { font-weight: 700; }
.tx-when { font-size: 13px; color: var(--muted); }
.tx-amt  { font-weight: 800; font-variant-numeric: tabular-nums; }
.tx-status { font-size: 12px; font-weight: 800; letter-spacing: .06em;
             text-transform: uppercase; }
.st-pending, .st-processing { color: var(--gold-2); }
.st-complete { color: var(--green); }
.st-failed, .st-cancelled { color: var(--red); }
.empty { color: var(--muted); font-size: 15px; padding: 6px 2px; }

/* ================= SHEET ================= */
.sheet {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(6,3,12,.72); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0 } }

.sheet-panel {
  position: relative; width: 100%; max-width: 440px;
  background: linear-gradient(180deg, #1b1030, #120a22);
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: 26px 26px 0 0;
  padding: 26px 20px max(26px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--shadow);
  animation: rise .24s cubic-bezier(.16,1,.3,1);
}
@keyframes rise { from { transform: translateY(100%) } }
@media (min-width: 520px) {
  .sheet { align-items: center; }
  .sheet-panel { border-radius: 26px; border-bottom: 1px solid var(--line); }
}

.sheet-close { position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,.08); border: 0; color: var(--text);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 15px; }
.sheet-title { font-size: 25px; font-weight: 800; }
.sheet-sub { color: var(--muted); margin-top: -10px; }
.fineprint { font-size: 13px; color: var(--muted); text-align: center; }

/* Preset chips carry most of the traffic — typing is the fallback, not the path. */
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.chip {
  font: inherit; font-weight: 800; font-size: 18px; cursor: pointer;
  padding: 16px 8px; border-radius: 14px; min-height: 58px;
  background: rgba(255,255,255,.06); color: var(--text);
  border: 1.5px solid rgba(255,255,255,.12);
  transition: transform .1s ease, border-color .1s ease, background .1s ease;
}
.chip:active { transform: scale(.96); }
.chip.on { background: rgba(255,201,60,.16); border-color: var(--gold-2);
           color: var(--gold-1); }

.amount-input { position: relative; display: flex; align-items: center; }
.amount-input em { position: absolute; left: 16px; font-style: normal;
                   font-weight: 800; color: var(--muted); font-size: 19px; }
.amount-input input { padding-left: 34px; font-weight: 800; font-size: 20px; }

.done-panel { text-align: center; align-items: center; }
.done-mark { font-size: 60px; animation: pop .45s cubic-bezier(.16,1.4,.3,1); }
@keyframes pop { from { transform: scale(.3); opacity: 0 } }
