/* ============ base ============ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #0d0a1f;
  --card-front-1: #7c3aed;
  --card-front-2: #4f46e5;
  --card-front-3: #db2777;
  --gold-1: #fbbf24;
  --gold-2: #f59e0b;
  --text: #f5f3ff;
  --text-dim: #a5a0c2;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
}

html, body { height: 100%; }

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ============ animated background ============ */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  z-index: 0;
  animation: drift 14s ease-in-out infinite alternate;
}
.blob-1 { width: 420px; height: 420px; background: #6d28d9; top: -120px; left: -100px; }
.blob-2 { width: 360px; height: 360px; background: #be185d; bottom: -100px; right: -80px; animation-delay: -4s; }
.blob-3 { width: 260px; height: 260px; background: #1d4ed8; top: 40%; left: 55%; animation-delay: -8s; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, -30px) scale(1.15); }
}

/* ============ phone shell ============ */
.phone {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  height: 100dvh;
  max-height: 900px;
  display: flex;
  flex-direction: column;
  padding: 20px 22px calc(18px + env(safe-area-inset-bottom));
  overflow: hidden; /* views scroll inside; topbar + bottomnav stay pinned */
}

@media (min-width: 480px) {
  .phone {
    height: min(880px, 94vh);
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    background: rgba(13, 10, 31, 0.6);
    backdrop-filter: blur(30px);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.08);
  }
}

/* ============ topbar ============ */
.topbar {
  flex-shrink: 0; /* pinned at the top of the phone shell */
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideDown 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.avatar {
  width: 46px; height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  display: grid; place-items: center;
  font-size: 22px;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.45);
}
.greeting { display: flex; flex-direction: column; flex: 1; }
.hi { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 15px; }
.sub { font-size: 12px; color: var(--text-dim); }

.wallet {
  display: flex; align-items: center; gap: 7px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 9px 15px;
  backdrop-filter: blur(12px);
  transition: transform 0.3s;
}
.wallet.bump { animation: bump 0.5s ease; }
@keyframes bump {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.18); box-shadow: 0 0 24px rgba(251, 191, 36, 0.5); }
}
.coin { font-size: 15px; }
.balance {
  font-family: 'Sora', sans-serif;
  font-weight: 800; font-size: 14px;
  background: linear-gradient(90deg, var(--gold-1), #fde68a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============ hero ============ */
.hero { text-align: center; margin-top: 26px; animation: fadeUp 0.7s 0.1s cubic-bezier(0.22,1,0.36,1) both; }
.badge {
  display: inline-block;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #d8b4fe;
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(38px, 11vw, 46px);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #f5f3ff 20%, #c4b5fd 50%, #f0abfc 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.05;
}
.amp { -webkit-text-fill-color: initial; color: var(--gold-1); }
.tagline { margin-top: 8px; font-size: 14px; color: var(--text-dim); }
.tagline b { color: var(--gold-1); font-weight: 700; }

/* ============ round info ============ */
.round-info {
  display: flex; justify-content: space-between; align-items: center;
  margin: 22px 2px 14px;
  animation: fadeUp 0.7s 0.2s cubic-bezier(0.22,1,0.36,1) both;
}
.pill {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 8px 14px;
  border-radius: 999px;
}
.pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
  animation: pulse 1.6s infinite;
}
.pill.used .dot { background: #f87171; box-shadow: 0 0 10px #f87171; animation: none; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.streak { font-size: 12.5px; font-weight: 700; color: var(--text-dim); }

/* ============ card grid ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  flex: 1;
  align-content: center;
  min-height: 300px;
}

.card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  perspective: 900px;
  cursor: pointer;
  animation: dealIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.card:nth-child(1) { animation-delay: 0.25s; }
.card:nth-child(2) { animation-delay: 0.34s; }
.card:nth-child(3) { animation-delay: 0.43s; }
.card:nth-child(4) { animation-delay: 0.52s; }

@keyframes dealIn {
  from { opacity: 0; transform: translateY(34px) scale(0.8); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.card-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.34, 1.3, 0.5, 1);
}
.card.flipped .card-inner { transform: rotateY(180deg); }

.card:not(.flipped):not(.locked):hover .card-inner { transform: rotateY(14deg) translateY(-5px); }
.card:not(.flipped):not(.locked):active .card-inner { transform: scale(0.94); }

.card-face {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
}

/* front (hidden side the user sees first) */
.card-front {
  background: linear-gradient(150deg, var(--card-front-1), var(--card-front-2) 55%, var(--card-front-3));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}
.card-front .q {
  font-family: 'Sora', sans-serif;
  font-size: 46px; font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 3px 14px rgba(0,0,0,0.3);
}
.card-front .deco { font-size: 13px; opacity: 0.75; letter-spacing: 0.3em; }

/* shimmer sweep on card fronts */
.card-front::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.28), transparent);
  animation: shimmer 3.2s infinite;
}
@keyframes shimmer {
  0% { left: -80%; }
  55%, 100% { left: 140%; }
}

/* back (reward side) */
.card-back {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, #2a2151, #17122e);
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.card-back .emoji { font-size: 34px; }
.card-back .amount {
  font-family: 'Sora', sans-serif;
  font-size: 28px; font-weight: 800;
  background: linear-gradient(90deg, var(--gold-1), #fde68a, var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.card-back .label { font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }

/* winner card glow */
.card.winner .card-back {
  border-color: var(--gold-1);
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.45), inset 0 0 24px rgba(251, 191, 36, 0.08);
  animation: winGlow 1.4s ease-in-out infinite alternate;
}
@keyframes winGlow {
  from { box-shadow: 0 0 18px rgba(251, 191, 36, 0.35); }
  to   { box-shadow: 0 0 40px rgba(251, 191, 36, 0.6); }
}

.card.locked { cursor: default; }

/* ============ footer ============ */
.footer { text-align: center; margin-top: 18px; animation: fadeUp 0.7s 0.35s cubic-bezier(0.22,1,0.36,1) both; }

.btn-play {
  position: relative;
  width: 100%;
  padding: 17px;
  border: none;
  border-radius: 18px;
  font-family: 'Sora', sans-serif;
  font-size: 16px; font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, #7c3aed, #db2777);
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
}
.btn-play:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(124, 58, 237, 0.55); }
.btn-play:not(:disabled):active { transform: scale(0.97); }
.btn-play:disabled { opacity: 0.85; cursor: default; background: var(--glass); border: 1px solid var(--glass-border); box-shadow: none; color: var(--text-dim); }

.btn-shine {
  position: absolute;
  top: 0; left: -70%;
  width: 45%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: shimmer 2.6s infinite;
  pointer-events: none;
}
.btn-play:disabled .btn-shine { display: none; }

.hint { margin-top: 12px; font-size: 12px; color: var(--text-dim); }

/* ============ views ============ */
.view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto; /* only the view content scrolls */
  scrollbar-width: none;
}
.view::-webkit-scrollbar { display: none; }
.view[hidden] { display: none; }

/* ============ bottom nav ============ */
.bottomnav {
  flex-shrink: 0; /* pinned at the bottom of the phone shell, never scrolls */
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 8px;
  background: rgba(22, 17, 48, 0.92);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 0 8px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--text-dim);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, transform 0.15s;
}
.nav-btn .nav-ico { font-size: 18px; }
.nav-btn.active {
  background: linear-gradient(120deg, rgba(124, 58, 237, 0.35), rgba(219, 39, 119, 0.3));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
.nav-btn:active { transform: scale(0.95); }

/* ============ withdraw view ============ */
.wd-hero { text-align: center; margin-top: 20px; animation: fadeUp 0.6s cubic-bezier(0.22,1,0.36,1) both; }
.wd-title { font-size: clamp(32px, 9vw, 38px); }

.wd-balance-card {
  margin-top: 18px;
  padding: 18px 22px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(219, 39, 119, 0.25));
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.25);
  animation: fadeUp 0.6s 0.08s cubic-bezier(0.22,1,0.36,1) both;
}
.wd-label { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.wd-amount {
  font-family: 'Sora', sans-serif;
  font-size: 34px; font-weight: 800;
  background: linear-gradient(90deg, var(--gold-1), #fde68a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wd-card {
  margin-top: 14px;
  padding: 18px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  animation: fadeUp 0.6s 0.16s cubic-bezier(0.22,1,0.36,1) both;
}
.gp-head { display: flex; align-items: center; gap: 12px; }
.gp-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  flex-shrink: 0;
}
.gp-info h3 { font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 700; }
.gp-info p { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

.chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.chip {
  padding: 11px 0;
  border-radius: 13px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: 'Sora', sans-serif;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover { border-color: rgba(251, 191, 36, 0.5); }
.chip.selected {
  background: linear-gradient(120deg, var(--gold-1), var(--gold-2));
  color: #1a1206;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(251, 191, 36, 0.35);
}
.chip:active { transform: scale(0.94); }

.wd-input {
  width: 100%;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.wd-input::placeholder { color: var(--text-dim); }
.wd-input:focus { border-color: rgba(168, 85, 247, 0.6); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18); }

.btn-redeem {
  position: relative;
  width: 100%;
  margin-top: 14px;
  padding: 15px;
  border: none;
  border-radius: 15px;
  font-family: 'Sora', sans-serif;
  font-size: 15px; font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, #7c3aed, #db2777);
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-redeem:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(124, 58, 237, 0.5); }
.btn-redeem:active { transform: scale(0.97); }

.wd-note { margin-top: 11px; font-size: 12px; color: var(--text-dim); text-align: center; transition: color 0.25s; }
.wd-note.error { color: #f87171; animation: shake 0.4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.wd-history {
  margin-top: 16px;
  animation: fadeUp 0.6s 0.24s cubic-bezier(0.22,1,0.36,1) both;
}
.wd-history h4 { font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.wd-empty { font-size: 12.5px; color: var(--text-dim); text-align: center; padding: 14px 0 6px; }

.wd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 15px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  margin-bottom: 8px;
}
.wd-item.has-code { cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.wd-item.has-code:hover { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.05); }
.wd-item-ico { font-size: 19px; }
.wd-item-code {
  font-family: 'Sora', sans-serif;
  font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--gold-1);
}
.wd-item-mid { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wd-item-amt { font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 700; }
.wd-item-sub { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-status {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* ============ modal ============ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(8, 6, 20, 0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.modal-backdrop.show { opacity: 1; pointer-events: auto; }

.modal {
  position: relative;
  width: min(330px, 86vw);
  text-align: center;
  padding: 38px 28px 30px;
  border-radius: 30px;
  background: linear-gradient(165deg, #241b4d, #140f2d);
  border: 1px solid rgba(251, 191, 36, 0.3);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  transform: scale(0.7) translateY(30px);
  transition: transform 0.45s cubic-bezier(0.34, 1.45, 0.5, 1);
}
.modal-backdrop.show .modal { transform: scale(1) translateY(0); }

.modal-glow {
  position: absolute;
  top: -40px; left: 50%;
  width: 180px; height: 180px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(251,191,36,0.35), transparent 70%);
  pointer-events: none;
}
.trophy { font-size: 58px; animation: bounce 1.2s ease infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-12px) rotate(-6deg); }
}
.modal h2 { font-family: 'Sora', sans-serif; font-size: 24px; font-weight: 800; margin-top: 6px; }
.won-amount {
  font-family: 'Sora', sans-serif;
  font-size: 52px; font-weight: 800;
  margin-top: 8px;
  background: linear-gradient(90deg, var(--gold-1), #fde68a, var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(251, 191, 36, 0.35));
}
.modal-sub { font-size: 13px; color: var(--text-dim); margin-top: 4px; }

.btn-collect {
  margin-top: 24px;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 16px;
  font-family: 'Sora', sans-serif;
  font-size: 15px; font-weight: 700;
  color: #1a1206;
  background: linear-gradient(120deg, var(--gold-1), #fde047);
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(251, 191, 36, 0.35);
  transition: transform 0.2s;
}
.btn-collect:hover { transform: translateY(-2px); }
.btn-collect:active { transform: scale(0.96); }

/* ============ loading modal ============ */
.spinner {
  width: 58px; height: 58px;
  margin: 0 auto;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--gold-1);
  border-right-color: #a78bfa;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-title { font-family: 'Sora', sans-serif; font-size: 21px; font-weight: 800; margin-top: 18px; }

.progress-track {
  margin-top: 18px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #db2777, var(--gold-1));
  transition: width 0.4s linear;
}
.loading-hint { margin-top: 12px; font-size: 11px; color: var(--text-dim); }

/* ============ code box + copy ============ */
.code-box {
  margin-top: 16px;
  padding: 15px 10px;
  border-radius: 14px;
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold-1);
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px dashed rgba(251, 191, 36, 0.5);
  user-select: all;
}
.btn-copy {
  margin-top: 12px;
  width: 100%;
  padding: 13px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 14px;
  font-family: 'Sora', sans-serif;
  font-size: 14px; font-weight: 700;
  color: var(--gold-1);
  background: rgba(251, 191, 36, 0.1);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-copy:hover { background: rgba(251, 191, 36, 0.2); }
.btn-copy:active { transform: scale(0.96); }
.btn-copy.copied { background: rgba(74, 222, 128, 0.15); border-color: rgba(74, 222, 128, 0.5); color: #4ade80; }

.modal .btn-collect { margin-top: 12px; }

/* ============ cooldown state ============ */
.grid.cooldown .card { pointer-events: none; }
.grid.cooldown .card .card-front { filter: grayscale(0.7) brightness(0.55); }
.grid.cooldown .card .card-front::after { display: none; }

.card .lock-badge {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  place-items: center;
  font-size: 30px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}
.grid.cooldown .card .lock-badge { display: grid; }

.btn-play.timer {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

/* success status badge */
.wd-status.success {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.35);
}

/* ============ confetti ============ */
#confetti {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

/* ============ 🔒 subscription lock ============ */
.wd-lock {
  margin-top: 14px;
  padding: 20px 18px 16px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 0, 0, 0.10), rgba(124, 58, 237, 0.12));
  border: 1px solid rgba(255, 70, 70, 0.35);
  backdrop-filter: blur(14px);
  animation: fadeUp 0.6s 0.12s cubic-bezier(0.22,1,0.36,1) both;
}
.wd-lock[hidden] { display: none; }

.lock-head { text-align: center; }
.lock-big { font-size: 42px; display: inline-block; animation: bounce 1.6s ease infinite; }
.lock-head h3 {
  font-family: 'Sora', sans-serif;
  font-size: 20px; font-weight: 800;
  margin-top: 6px;
  background: linear-gradient(90deg, #f87171, var(--gold-1));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lock-head p { font-size: 12.5px; color: var(--text-dim); margin-top: 5px; line-height: 1.5; }
.lock-head p b { color: var(--gold-1); }

.ch-list { display: flex; flex-direction: column; gap: 8px; margin-top: 15px; }

.ch-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 13px;
  border-radius: 15px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}
.ch-item:hover { border-color: rgba(255, 70, 70, 0.55); background: rgba(255, 0, 0, 0.07); }
.ch-item:active { transform: scale(0.97); }
.ch-item.done { border-color: rgba(74, 222, 128, 0.45); background: rgba(74, 222, 128, 0.07); cursor: default; }

.ch-ico {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: #fff;
  flex-shrink: 0;
  box-shadow: 0 5px 14px rgba(0,0,0,0.35);
}
.ch-mid { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ch-name { font-family: 'Sora', sans-serif; font-size: 13.5px; font-weight: 700; }
.ch-sub { font-size: 10.5px; color: var(--text-dim); }
.ch-action {
  font-family: 'Sora', sans-serif;
  font-size: 11px; font-weight: 700;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: #ff0000;
  box-shadow: 0 5px 14px rgba(255, 0, 0, 0.35);
  white-space: nowrap;
}
.ch-item.done .ch-action { background: rgba(74, 222, 128, 0.15); color: #4ade80; box-shadow: none; }

.lock-progress {
  margin-top: 13px;
  text-align: center;
  font-size: 12px; font-weight: 700;
  color: var(--gold-1);
  letter-spacing: 0.06em;
}

/* review panel */
.review-panel { border-color: rgba(251, 191, 36, 0.4); background: linear-gradient(160deg, rgba(251, 191, 36, 0.10), rgba(124, 58, 237, 0.12)); }
.review-panel .lock-head h3 { background: linear-gradient(90deg, var(--gold-1), #fde68a); -webkit-background-clip: text; background-clip: text; }

.review-bar {
  margin-top: 16px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.review-bar-fill {
  height: 100%;
  width: 45%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-1), #f59e0b);
  animation: reviewSlide 1.8s ease-in-out infinite alternate;
}
@keyframes reviewSlide {
  from { width: 25%; }
  to   { width: 75%; }
}

/* locked redeem card */
.wd-card.locked {
  opacity: 0.45;
  filter: blur(1.5px) grayscale(0.4);
  pointer-events: none;
  user-select: none;
}

/* locked daily-cards button + hint */
.btn-play.locked-gate {
  background: linear-gradient(120deg, #dc2626, #f59e0b);
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.4);
}
.hint-warn { color: #f87171; }

/* ============ site footer (legal pages) ============ */
.site-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
  animation: fadeUp 0.6s 0.3s cubic-bezier(0.22,1,0.36,1) both;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
}
.footer-link {
  border: none;
  background: none;
  color: var(--text-dim);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 2px;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--gold-1); text-decoration: underline; }
.footer-copy { margin-top: 10px; font-size: 10.5px; color: var(--text-dim); opacity: 0.7; }

/* legal page modal */
.legal-modal {
  width: min(360px, 90vw);
  max-height: 80vh;
  text-align: left;
  padding: 26px 22px 24px;
  display: flex;
  flex-direction: column;
}
.legal-modal h2 {
  font-family: 'Sora', sans-serif;
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 12px;
  padding-right: 24px;
}
.legal-body {
  overflow-y: auto;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-dim);
  scrollbar-width: none;
}
.legal-body::-webkit-scrollbar { display: none; }
.legal-body p { margin-bottom: 10px; }
.legal-body b { color: var(--text); }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.modal-close:hover { background: rgba(255,255,255,0.12); }

/* ============ shared keyframes ============ */
@keyframes slideDown { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
