﻿/* ============================================================
   NairaSpin — global styles
   Dark navy + gold, mobile-first, no external assets.
   ============================================================ */

:root {
  --bg: #070b12;
  --bg-2: #0a101b;
  --panel: #0f1726;
  --panel-2: #131d2f;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.24);
  --text: #e9eef8;
  --muted: #93a1b8;
  --muted-2: #6b7a92;
  --gold: #f7c948;
  --gold-deep: #d9a406;
  --green: #2fbf71;
  --red: #f05555;
  --blue: #4aa8ff;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }

::selection { background: rgba(247, 201, 72, 0.35); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  background: var(--panel-2);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(180deg, #ffd75e, #e9b21b);
  color: #241a00;
  box-shadow: 0 10px 26px rgba(247, 201, 72, 0.22);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(247, 201, 72, 0.32); }

.btn-green {
  background: linear-gradient(180deg, #37d183, #22a35c);
  color: #04140b;
  box-shadow: 0 10px 26px rgba(47, 191, 113, 0.2);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}
.btn-ghost:hover { color: var(--text); border-color: var(--line-strong); }

.btn-danger { background: rgba(240, 85, 85, 0.14); color: #ff8b8b; border-color: rgba(240, 85, 85, 0.35); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 26px; font-size: 17px; border-radius: 14px; }

/* ------------------------------------------------------------ landing */

body.landing {
  background:
    radial-gradient(1000px 560px at 50% -12%, rgba(247, 201, 72, 0.16), transparent 62%),
    radial-gradient(760px 460px at 88% 6%, rgba(47, 191, 113, 0.12), transparent 60%),
    radial-gradient(700px 500px at 4% 30%, rgba(74, 168, 255, 0.08), transparent 60%),
    var(--bg);
}

.topbar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffd75e, #d9a406);
  color: #241a00;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(247, 201, 72, 0.28);
}

.ghost-link { color: var(--muted); font-size: 14px; font-weight: 600; }
.ghost-link:hover { color: var(--text); text-decoration: none; }

.hero {
  max-width: 620px;
  margin: 0 auto;
  padding: 34px 20px 70px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(247, 201, 72, 0.28);
  background: rgba(247, 201, 72, 0.07);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(38px, 8vw, 62px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hl {
  background: linear-gradient(100deg, #ffe08a, #f7c948 45%, #e0a800);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 16px auto 0;
  max-width: 480px;
  color: var(--muted);
  font-size: 16px;
}

.login-card {
  margin: 30px auto 0;
  max-width: 420px;
  text-align: left;
  background: linear-gradient(180deg, rgba(19, 29, 47, 0.92), rgba(12, 18, 30, 0.92));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.login-card label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 8px;
}

.phone-input {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  background: #08101d;
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.phone-input:focus-within {
  border-color: rgba(247, 201, 72, 0.6);
  box-shadow: 0 0 0 4px rgba(247, 201, 72, 0.1);
}

.phone-input .prefix {
  display: grid;
  place-items: center;
  padding: 0 14px;
  color: var(--muted);
  font-weight: 700;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.phone-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
  padding: 14px;
  letter-spacing: 0.02em;
  outline: none;
}

.login-card .btn { margin-top: 14px; }

.fine {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted-2);
}

.form-error {
  margin-top: 12px;
  color: #ffb0b0;
  background: rgba(240, 85, 85, 0.1);
  border: 1px solid rgba(240, 85, 85, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 56px;
  text-align: left;
}

.step {
  background: rgba(15, 23, 38, 0.66);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
}
.step-num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(247, 201, 72, 0.14);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}
.step h3 { font-size: 14px; margin-bottom: 4px; }
.step p { font-size: 13px; color: var(--muted); }

.faq { margin-top: 46px; text-align: left; }
.faq h2 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 8px; }
.faq details { border-top: 1px solid var(--line); padding: 14px 2px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin-top: 8px; color: var(--muted); font-size: 13.5px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 20px 40px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12px;
}

/* ------------------------------------------------------------ app shell */

.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: rgba(7, 11, 18, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.appbar .brand { font-size: 15px; }

.appbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chips { display: flex; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(19, 29, 47, 0.7);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.chip b {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.chip.gold { border-color: rgba(247, 201, 72, 0.3); }
.chip.gold b { color: var(--gold); }

.chip-btn {
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.chip-btn:hover { border-color: rgba(247, 201, 72, 0.45); background: rgba(247, 201, 72, 0.08); }

/* earnings modal */

.earn-hero { text-align: center; margin: 4px 0 16px; }
.earn-hero .k {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 700;
}
.earn-hero .v {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

.earn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.earn-grid > div {
  background: rgba(8, 16, 29, 0.6);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
}
.earn-grid span { display: block; font-size: 11px; color: var(--muted-2); }
.earn-grid b { display: block; margin-top: 3px; font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }

/* admin live toast */

.admin-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  max-width: 320px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(247, 201, 72, 0.45);
  background: #0e1726;
  color: var(--text);
  font-size: 13px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.admin-toast.show { opacity: 1; transform: translateY(0); }

/* transfer proof uploads */

.file-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.file-btn:hover { border-color: rgba(247, 201, 72, 0.4); color: var(--gold); }
.proof-input { display: none; }
.proof-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  vertical-align: middle;
  margin-right: 8px;
}
.notice-image {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin: 12px 0 4px;
  background: #0a1220;
}
.proof-link { display: inline-block; margin-top: 2px; font-size: 11.5px; color: var(--gold); }

/* quick paste for bank details */
.paste-card {
  border: 1px dashed rgba(247, 201, 72, 0.4);
  background: rgba(247, 201, 72, 0.05);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
}
.paste-card label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 7px;
}
.paste-card textarea {
  width: 100%;
  min-height: 54px;
  resize: vertical;
  font-size: 13px;
  line-height: 1.6;
}
.paste-card .hint { margin-top: 7px; }

/* onboarding tour (arrow + spotlight) */
.tour-layer { position: fixed; inset: 0; z-index: 95; display: none; pointer-events: none; }
.tour-layer.show { display: block; }

.tour-ring {
  position: fixed;
  border: 2px solid rgba(247, 201, 72, 0.95);
  box-shadow: 0 0 0 4px rgba(247, 201, 72, 0.14), 0 0 0 9999px rgba(4, 8, 15, 0.62);
  transition: left 0.25s ease, top 0.25s ease, width 0.25s ease, height 0.25s ease;
  pointer-events: none;
}

.tour-target { position: relative; z-index: 96; }

.tour-bubble {
  position: fixed;
  background: #0e1726;
  border: 1px solid rgba(247, 201, 72, 0.4);
  border-radius: 14px;
  padding: 14px 14px 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  z-index: 97;
}

.tour-text { margin: 0 0 12px; font-size: 13.5px; line-height: 1.75; color: var(--text); }
.tour-actions { display: flex; gap: 8px; justify-content: flex-end; }

.tour-bubble::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #0e1726;
  transform: rotate(45deg);
}
.tour-bubble.above::after {
  bottom: -7px;
  left: var(--arrow-x, 50%);
  margin-left: -6px;
  border-right: 1px solid rgba(247, 201, 72, 0.4);
  border-bottom: 1px solid rgba(247, 201, 72, 0.4);
}
.tour-bubble.below::after {
  top: -7px;
  left: var(--arrow-x, 50%);
  margin-left: -6px;
  border-left: 1px solid rgba(247, 201, 72, 0.4);
  border-top: 1px solid rgba(247, 201, 72, 0.4);
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 22px 16px 90px;
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 20px;
}

.tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: linear-gradient(180deg, #1b2740, #151f33);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 16px rgba(0, 0, 0, 0.3);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade-in 0.25s ease; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid-2 > * { min-width: 0; }

.card {
  background: linear-gradient(180deg, rgba(19, 29, 47, 0.92), rgba(11, 17, 29, 0.94));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
  min-width: 0;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-head h2 { font-size: 16px; }
.card-head .sub { font-size: 12px; color: var(--muted-2); margin-top: 3px; }

.section-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 700;
  margin: 0 0 10px;
}

/* ------------------------------------------------------------ forms */

.field { margin-bottom: 14px; }
.field > label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 7px;
}

.input, select.input, textarea.input {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #08101d;
  color: var(--text);
  border-radius: 11px;
  padding: 12px 13px;
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: #4c5a70; }
.input:focus {
  border-color: rgba(247, 201, 72, 0.55);
  box-shadow: 0 0 0 4px rgba(247, 201, 72, 0.09);
}

.select-wrap { position: relative; }
.select-wrap select { appearance: none; padding-right: 38px; }
.select-wrap::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
  font-size: 12px;
}

.hint { margin-top: 6px; font-size: 12px; color: var(--muted-2); }

.promo {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(247, 201, 72, 0.09);
  border: 1px solid rgba(247, 201, 72, 0.28);
  color: #ffd75e;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
}

.input-code {
  font-family: "Cascadia Mono", Consolas, "SF Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 16px;
}

.segmented { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  display: grid;
  place-items: center;
  padding: 10px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #08101d;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  margin: 0;
}
.segmented label:hover { color: var(--text); border-color: var(--line-strong); }
.segmented input:checked + label {
  background: rgba(247, 201, 72, 0.12);
  border-color: rgba(247, 201, 72, 0.65);
  color: var(--gold);
}
.segmented input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 2px; }

.region-code {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.segmented label .region-code { font-size: 17px; }

.region-toggle { display: flex; gap: 6px; }
.region-toggle label { margin: 0; }

/* ------------------------------------------------------------ tables */

.table-wrap { overflow-x: auto; margin: 0 -6px; max-width: 100%; }
table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 480px;
}
.table th {
  text-align: left;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 700;
  padding: 8px 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 11px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.07);
  color: #c8d2e2;
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .code { font-family: Consolas, monospace; font-size: 12px; color: var(--muted); }

.card table.table.table-compact { min-width: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-pending { color: #f2c55c; background: rgba(242, 197, 92, 0.12); }
.badge-approved, .badge-paid { color: #57d68d; background: rgba(87, 214, 141, 0.12); }
.badge-rejected { color: #ff8b8b; background: rgba(240, 85, 85, 0.12); }
.badge-loss { color: var(--muted); background: rgba(148, 163, 184, 0.12); }

.empty {
  text-align: center;
  padding: 34px 16px;
  color: var(--muted-2);
  font-size: 13px;
}
.empty .big { font-size: 26px; display: block; margin-bottom: 8px; opacity: 0.7; }

/* ------------------------------------------------------------ wheel */

.wheel-card { text-align: center; }

.wheel-stage {
  position: relative;
  width: min(360px, 100%);
  margin: 6px auto 0;
  aspect-ratio: 1;
}

.wheel-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.55));
}

.wheel-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 26px solid var(--gold);
  filter: drop-shadow(0 4px 10px rgba(247, 201, 72, 0.5));
  z-index: 3;
}
.wheel-pointer::after {
  content: "";
  position: absolute;
  top: -34px;
  left: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #f7c948 55%, #c99400);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.spin-bar {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.spin-count {
  font-size: 13px;
  color: var(--muted);
}
.spin-count b { color: var(--gold); }

.prize-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted-2);
}
.prize-legend span { display: inline-flex; align-items: center; gap: 6px; }
.prize-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* wheel + submit layout: form drops below the wheel on mobile */
.spin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "wheel side"
    "submit subs";
  gap: 16px;
  align-items: stretch;
}

.wheel-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.spin-layout > .card { margin-bottom: 0; }
.area-wheel { grid-area: wheel; }
.area-side { grid-area: side; min-width: 0; }
.area-submit { grid-area: submit; min-width: 0; }
.area-subs { grid-area: subs; min-width: 0; }

@media (max-width: 900px) {
  .spin-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "wheel"
      "submit"
      "side"
      "subs";
  }

  /* 手机端：转盘略缩小、留白收紧，让提交表单更早出现 */
  .wheel-stage { width: min(300px, 100%); }
  .wheel-card { padding: 14px 14px 16px; }
  .spin-bar { margin-top: 10px; }
  .spin-bar .hint { margin-top: 6px; }
  .card { padding: 16px; }
}

/* ------------------------------------------------------------ modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 7, 12, 0.72);
  backdrop-filter: blur(6px);
}
.modal.open { display: flex; }

.modal-card {
  width: min(380px, 100%);
  text-align: center;
  background: linear-gradient(180deg, #1a2740, #0e1626);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  padding: 30px 24px 24px;
  box-shadow: var(--shadow);
  animation: pop-in 0.28s cubic-bezier(0.2, 1.2, 0.4, 1);
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-badge {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin: 0 auto 16px;
  border-radius: 50%;
  font-size: 30px;
  background: rgba(247, 201, 72, 0.12);
  border: 1px solid rgba(247, 201, 72, 0.35);
}
.modal-card h3 { font-size: 22px; margin-bottom: 6px; }
.modal-card p { color: var(--muted); font-size: 14px; }
.modal-amount {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gold);
  margin: 12px 0 2px;
  font-variant-numeric: tabular-nums;
}

.modal-balance-label {
  margin-top: 14px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 700;
}
.modal-card .btn { margin-top: 20px; }

/* activity rules under the login card */

.rules-box {
  margin: 18px auto 0;
  max-width: 460px;
  text-align: left;
  background: rgba(15, 23, 38, 0.66);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.rules-box h2 {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 10px;
}
.rules-text {
  white-space: pre-line;
  color: #b9c4d6;
  font-size: 13px;
  line-height: 1.85;
}

/* ------------------------------------------------------------ toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  z-index: 90;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 12px;
  background: #1c2740;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 13.5px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #3a1418; border-color: rgba(240, 85, 85, 0.4); color: #ffc4c4; }
.toast.success { background: #0f2a1d; border-color: rgba(47, 191, 113, 0.4); color: #b7f5cf; }

/* ------------------------------------------------------------ stats */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.stat {
  background: rgba(19, 29, 47, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
}
.stat .k {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 700;
}
.stat .v {
  font-size: 21px;
  font-weight: 800;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat .v.gold { color: var(--gold); }
.stat .v.green { color: var(--green); }

/* ------------------------------------------------------------ admin */

body.admin-body { background: #080c14; }

.admin-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #0a0f19;
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar .brand { padding: 4px 8px 16px; }

.side-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #566176;
  font-weight: 700;
  padding: 14px 10px 6px;
}

.side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}
.side-link:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); text-decoration: none; }
.side-link.active { background: rgba(247, 201, 72, 0.11); color: var(--gold); }
.side-link .count {
  font-size: 11px;
  background: rgba(240, 85, 85, 0.18);
  color: #ff9d9d;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 700;
}

.admin-main {
  padding: 22px 26px 70px;
  min-width: 0;
}

.admin-main .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.admin-head h1 { font-size: 24px; }
.admin-head .sub { color: var(--muted-2); font-size: 13px; margin-top: 3px; }

.admin-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-tabs a {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.filter-tabs a:hover { text-decoration: none; color: var(--text); border-color: var(--line-strong); }
.filter-tabs a.active { background: rgba(247, 201, 72, 0.12); border-color: rgba(247, 201, 72, 0.5); color: var(--gold); }

.flash {
  margin-bottom: 16px;
  padding: 11px 14px;
  border-radius: 11px;
  font-size: 13px;
  background: rgba(47, 191, 113, 0.1);
  border: 1px solid rgba(47, 191, 113, 0.28);
  color: #b7f5cf;
}

.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline-form .input { padding: 6px 9px; font-size: 12.5px; border-radius: 8px; width: auto; }

.admin-table td, .admin-table th { padding: 9px 8px; }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted-2); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .field { margin-bottom: 0; }
.form-grid .full { grid-column: 1 / -1; }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text); }
.check-row input { width: 17px; height: 17px; accent-color: var(--gold); }

.mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12px; }
.muted { color: var(--muted-2); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }

/* ------------------------------------------------------------ 404/500 */

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
}
.error-page h1 { font-size: 72px; color: var(--gold); }
.error-page p { color: var(--muted); margin: 12px 0 22px; }

/* ------------------------------------------------------------ bottom nav (mobile app shell) */

.bottom-nav { display: none; }

@media (max-width: 640px) {
  .tabs { display: none; }

  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: rgba(8, 13, 22, 0.94);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
  }

  .bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: 0;
    color: var(--muted-2);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    padding: 8px 0 6px;
    border-radius: 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: color 0.15s ease, background 0.15s ease;
  }
  .bn-item svg { width: 22px; height: 22px; display: block; }
  .bn-item.active { color: var(--gold); background: rgba(247, 201, 72, 0.09); }

  .wrap { padding-bottom: 108px; }
}

/* ------------------------------------------------------------ live ticker */

.ticker {
  overflow: hidden;
  height: 38px;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, rgba(247, 201, 72, 0.08), rgba(247, 201, 72, 0.02));
  border-bottom: 1px solid rgba(247, 201, 72, 0.16);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 36px;
  white-space: nowrap;
  padding-left: 16px;
  animation: ticker-scroll 48s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #cfd8e6;
}
.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}
.ticker-dot.pay { background: var(--gold); }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ------------------------------------------------------------ invite */

.invite-code {
  border: 1px dashed rgba(247, 201, 72, 0.4);
  background: rgba(247, 201, 72, 0.06);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
}
.invite-code .k {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 700;
}
.invite-code .v {
  margin-top: 4px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--gold);
  font-family: Consolas, "Cascadia Mono", monospace;
}

.invite-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; line-height: 1.9; }
.invite-list li { margin-bottom: 6px; }
.invite-list b { color: var(--gold); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .admin-main .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px;
  }
  .sidebar .brand { padding: 0 10px 0 4px; }
  .side-label { display: none; }
  .admin-main { padding: 16px 14px 60px; }
}

@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; margin-top: 40px; }
  .hero { padding-top: 22px; }
  .appbar { padding: 10px 12px; gap: 8px; }
  .appbar .brand-name { display: none; }
  .chip { padding: 6px 10px; font-size: 11px; }
  .wrap { padding: 16px 12px 80px; }
  .card { padding: 15px; border-radius: 16px; }
  .wheel-stage { width: min(280px, 100%); }
  .wheel-card { padding: 12px 12px 14px; }
  .spin-bar { margin-top: 8px; }
  .spin-bar .btn-lg { padding-top: 12px; padding-bottom: 12px; }
  body { zoom: 0.9; }
  @supports not (zoom: 1) { body { font-size: 13.5px; } }

  /* 提交礼品卡区域整体更紧凑，让表单能出现在首屏 */
  .area-submit { padding: 12px 12px 14px; }
  .area-submit h2 { font-size: 15px; }
  .area-submit .sub { font-size: 11.5px; line-height: 1.6; margin-top: 2px; }
  .area-submit .field { margin-top: 10px; }
  .area-submit .field label { font-size: 11.5px; margin-bottom: 5px; }
  .area-submit .input { font-size: 13px; padding: 9px 10px; }
  .area-submit .hint { font-size: 10.5px; margin-top: 4px; }
  .area-submit .segmented label { font-size: 12.5px; padding: 8px 4px; }
  .area-submit .segmented { gap: 4px; }
  .area-submit .segmented label { font-size: 10.5px; padding: 5px 2px; border-radius: 7px; }
  .area-submit .btn-primary { font-size: 14px; padding-top: 11px; padding-bottom: 11px; }
  .form-grid { grid-template-columns: 1fr; }
  table.table { min-width: 100%; }
  .admin-head h1 { font-size: 20px; }
}

/* ---- mobile: fit wheel + submit card, keep all copy ---- */
@media (max-width: 640px) {
  .wheel-stage { width: min(300px, 76vw) !important; }
  .wheel-card { padding: 10px 8px 12px !important; }
  .spin-bar .hint { font-size: 11px !important; margin-top: 6px !important; }
  .spin-count { font-size: 13px !important; margin-bottom: 6px !important; }
  .spin-bar .btn { padding: 12px 26px !important; font-size: 16px !important; }
  .area-submit { margin-top: 10px !important; }
  .area-submit .card-head .sub { font-size: 11px !important; line-height: 1.5 !important; margin-top: 3px !important; }
  .area-submit .hint { font-size: 10.5px !important; line-height: 1.5 !important; margin-top: 6px !important; }
  .area-submit .input, .area-submit .input-code { padding: 10px 12px !important; font-size: 14px !important; }
  .area-submit .segmented label { padding: 8px 4px !important; font-size: 13px !important; }
  .area-submit .promo { font-size: 11px !important; padding: 8px 10px !important; margin-top: 8px !important; }
  .area-submit .btn-block { padding: 12px !important; font-size: 15px !important; }
  .area-submit .field { margin-bottom: 10px !important; }
  .card-head h2 { font-size: 16px !important; }
}
/* ---- smaller card region buttons ---- */
@media (max-width: 640px) {
  .area-submit .segmented { gap: 6px !important; }
  .area-submit .segmented label { padding: 6px 2px !important; font-size: 12px !important; border-radius: 8px !important; min-height: 0 !important; }
  .area-submit .segmented .region-code { font-size: 13px !important; letter-spacing: 0 !important; }
}
/* ---- card region: single row of 6 ---- */
@media (max-width: 640px) {
  .area-submit .segmented { grid-template-columns: repeat(6, 1fr) !important; gap: 5px !important; }
  .area-submit .segmented label { padding: 8px 0 !important; font-size: 11px !important; border-radius: 8px !important; }
  .area-submit .segmented .region-code { font-size: 11.5px !important; }
}