/* ============================================================
   StarMine Paradise - v3 UI (dark navy + amber/gold)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Background layers */
  --bg-0: #05080f;
  --bg-1: #0a1220;
  --bg-2: #101a2c;

  /* Cards */
  --card-bg: rgba(16, 24, 38, 0.78);
  --card-bg-solid: #101a2c;
  --card-border: rgba(148, 163, 184, 0.12);
  --card-border-strong: rgba(245, 158, 11, 0.24);

  /* Brand accents (mining / gold theme) */
  --brand-a: #f59e0b;   /* amber */
  --brand-b: #ea580c;   /* orange */
  --brand-c: #b45309;   /* bronze */
  --brand-glow: rgba(245, 158, 11, 0.45);

  /* Text */
  --text: #e2e8f0;
  --text-soft: #cbd5e1;
  --muted: #7a879b;
  --dim: #475569;

  /* Values / states */
  --gold: #fbbf24;
  --gold-hi: #fde68a;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #38bdf8;

  --line: rgba(148, 163, 184, 0.08);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  --radius: 20px;
  --radius-sm: 14px;
  --radius-lg: 28px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Noto Sans SC', 'Helvetica Neue', sans-serif;
  color: var(--text);
  background: var(--bg-0);
  font-size: 14px;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
b, strong { font-weight: 700; }

/* ---------- Ambient background ---------- */
.phone {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(1000px 700px at 50% -10%, rgba(59, 130, 246, 0.14), transparent 55%),
    radial-gradient(600px 500px at 110% 25%, rgba(245, 158, 11, 0.10), transparent 55%),
    radial-gradient(600px 400px at -20% 40%, rgba(56, 189, 248, 0.08), transparent 55%),
    linear-gradient(180deg, #0a1220 0%, #05080f 45%, #0a1220 100%);
}
.phone::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 22% 18%, rgba(255,255,255,0.75), transparent 60%),
    radial-gradient(1px 1px at 78% 30%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(1px 1px at 40% 65%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1px 1px at 65% 80%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1px 1px at 12% 90%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1px 1px at 88% 55%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(2px 2px at 30% 42%, rgba(251,191,36,0.4), transparent 60%),
    radial-gradient(2px 2px at 70% 12%, rgba(56,189,248,0.4), transparent 60%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
  animation: stars 26s linear infinite;
}
.phone::after {
  content: '';
  position: absolute;
  left: -20%; top: 15%;
  width: 140%; height: 50%;
  background: radial-gradient(ellipse at center, rgba(245,158,11,0.10), transparent 60%);
  filter: blur(45px);
  pointer-events: none;
  z-index: 0;
  animation: aurora 20s ease-in-out infinite alternate;
}
@keyframes stars {
  from { transform: translateY(0); }
  to   { transform: translateY(-8px); }
}
@keyframes aurora {
  from { transform: translate(-2%, 2%) scale(1); }
  to   { transform: translate(2%, -3%) scale(1.06); }
}

/* Icon defs holder */
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Helpers ---------- */
.svg-i { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; fill: currentColor; }
.num, .earn-val, .got, .code, .card b, .statc b, .earn-val span, .chip b {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}
.hidden { display: none !important; }

/* ---------- Auth ---------- */
.auth { flex: 1; display: none; padding: calc(28px + var(--safe-top)) 22px 40px; overflow: auto; position: relative; z-index: 1; }
.auth.show { display: block; }
.brand {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 24px 0 24px; padding: 8px 0;
}
.brand .pick {
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #b45309 55%, #78350f);
  display: grid; place-items: center;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 10px 26px rgba(245,158,11,.35), inset 0 1px 0 rgba(255,255,255,.4);
}
.brand h1 {
  margin: 0; font-size: 24px; font-weight: 800; letter-spacing: 0.2px;
  background: linear-gradient(90deg, #fbbf24 0%, #f97316 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px 22px 22px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(2,6,15,.6), inset 0 1px 0 rgba(255,255,255,.04);
}
.auth-card h2 { margin: 0 0 18px; font-size: 20px; font-weight: 700; }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  color: var(--muted); font-size: 12px;
  margin-bottom: 6px; letter-spacing: 0.02em;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: rgba(6, 10, 20, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(245,158,11,.55);
  box-shadow: 0 0 0 3px rgba(245,158,11,.15);
  background: rgba(10, 15, 26, 0.9);
}
.field input::placeholder, .field textarea::placeholder { color: #536078; }
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position: right 16px center, right 11px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

/* ---------- Buttons ---------- */
.btn {
  border: 0; border-radius: 14px;
  padding: 13px 16px;
  font-weight: 700; font-family: inherit; font-size: 15px;
  cursor: pointer;
  color: #fff;
  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
  position: relative; overflow: hidden;
}
.btn:active { transform: translateY(1px) scale(0.995); }
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 55%, #b45309 100%);
  box-shadow: 0 10px 26px rgba(245,158,11,.35), inset 0 1px 0 rgba(255,255,255,.24);
  color: #1a0f00;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.18), transparent 42%);
  pointer-events: none;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost {
  background: transparent; color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.2);
  width: 100%; margin-top: 8px;
}
.btn-ghost:hover { background: rgba(148, 163, 184, .06); }

.link-row {
  display: flex; justify-content: space-between; margin-top: 14px;
  font-size: 13px; color: var(--muted);
}
.link-row span { color: var(--brand-a); cursor: pointer; font-weight: 500; }
.link-row span:hover { text-decoration: underline; }

/* ---------- App shell ---------- */
.app { flex: 1; min-height: 0; display: none; flex-direction: column; position: relative; z-index: 1; }
.app.show { display: flex; }
.scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 6px 14px calc(96px + var(--safe-bottom));
  scroll-behavior: smooth;
}
.scroll::-webkit-scrollbar { width: 0; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-top)) 14px 8px;
  gap: 8px; position: relative;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 15px;
  color: #fbbf24;
  letter-spacing: 0.2px;
  position: relative;
}
.logo::before {
  content: '';
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  display: inline-block;
  box-shadow: 0 6px 16px rgba(245,158,11,.35), inset 0 1px 0 rgba(255,255,255,.35);
  position: relative;
}
.logo .brand-mark {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; display: grid; place-items: center;
  font-size: 14px; color: #fff;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.3));
}
.lang {
  background: rgba(16,24,38,0.8);
  border: 1px solid var(--card-border);
  color: var(--text-soft);
  border-radius: 999px; padding: 6px 12px; font-size: 12px;
  font-family: inherit; outline: none; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position: right 12px center, right 8px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 26px;
}
.logout {
  background: rgba(239,68,68,.10);
  border: 1px solid rgba(239,68,68,.32);
  color: #fca5a5;
  border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.logout:hover { filter: brightness(1.15); }

/* ---------- Earn card (premium hero) ---------- */
.earn-card {
  position: relative; overflow: hidden;
  background:
    radial-gradient(600px 400px at 100% 0%, rgba(245,158,11,.22), transparent 55%),
    radial-gradient(500px 350px at 0% 100%, rgba(2,132,199,.14), transparent 55%),
    linear-gradient(180deg, rgba(24, 36, 58, .92) 0%, rgba(14, 22, 36, .95) 100%);
  border: 1px solid var(--card-border-strong);
  border-radius: 24px;
  padding: 20px 20px 16px;
  box-shadow:
    0 30px 80px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -1px 0 rgba(0,0,0,.3);
}
.earn-card::before {
  content: ''; position: absolute; right: -80px; top: -80px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(251,191,36,.32), transparent 60%);
  filter: blur(4px);
  pointer-events: none;
}
.earn-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, transparent 0 100px, rgba(255,255,255,.014) 100px 101px),
    radial-gradient(1px 1px at 15% 20%, rgba(255,255,255,.08), transparent 55%),
    radial-gradient(1px 1px at 88% 65%, rgba(255,255,255,.06), transparent 55%);
  border-radius: 24px;
  mix-blend-mode: overlay;
}

/* Shimmer sweep */
.shimmer {
  position: absolute; inset: 0; border-radius: 24px;
  overflow: hidden; pointer-events: none;
  z-index: 2;
}
.shimmer::before {
  content: ''; position: absolute;
  top: -50%; left: -30%;
  width: 40%; height: 200%;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.06) 50%, transparent 70%);
  transform: rotate(0);
  animation: shimmerSweep 6s ease-in-out infinite;
}
@keyframes shimmerSweep {
  0%   { transform: translateX(-50%); opacity: 0; }
  15%  { opacity: 1; }
  50%  { transform: translateX(400%); opacity: 1; }
  55%  { opacity: 0; }
  100% { transform: translateX(400%); opacity: 0; }
}

.earn-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; position: relative; z-index: 3;
}
.tier-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px 4px 8px;
  background: linear-gradient(135deg, rgba(245,158,11,.18), rgba(180,83,9,.18));
  border: 1px solid rgba(251,191,36,.4);
  border-radius: 999px;
  color: #fde68a; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
}
.tier-chip svg { color: #fbbf24; }
.tier-chip.silver { color: #e2e8f0; border-color: rgba(203,213,225,.4); background: linear-gradient(135deg, rgba(148,163,184,.18), rgba(71,85,105,.18)); }
.tier-chip.silver svg { color: #cbd5e1; }
.tier-chip.diamond { color: #a5f3fc; border-color: rgba(103,232,249,.4); background: linear-gradient(135deg, rgba(6,182,212,.18), rgba(14,116,144,.18)); }
.tier-chip.diamond svg { color: #67e8f9; }

.times-pill {
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.35);
  color: #86efac;
  border-radius: 999px; padding: 4px 12px 4px 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  display: inline-flex; align-items: center; gap: 6px;
}
.times-pill::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: dot 1.4s ease-in-out infinite;
}
@keyframes dot { 0%,100%{opacity:1} 50%{opacity:.35} }

.balance-hero {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px; position: relative; z-index: 3;
}
.coin-badge {
  width: 66px; height: 66px; flex-shrink: 0;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 210deg, #78350f, #fbbf24, #fef3c7, #fbbf24, #78350f);
  box-shadow:
    0 10px 24px rgba(245,158,11,.45),
    inset 0 0 0 1px rgba(0,0,0,.4);
  position: relative;
  animation: coinFloat 4s ease-in-out infinite;
}
@keyframes coinFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-3px); }
}
.coin-badge::before {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  background: radial-gradient(circle, rgba(251,191,36,.35), transparent 60%);
  filter: blur(8px); z-index: -1;
}
.coin-badge svg { width: 100%; height: 100%; display: block; }
.balance-body { flex: 1; min-width: 0; }
.earn-label {
  color: rgba(203,213,225,.62); font-size: 10px;
  letter-spacing: 2.4px; font-weight: 600;
  text-transform: uppercase;
}
.earn-val {
  font-size: 32px; font-weight: 900; margin: 2px 0 6px;
  color: #fff;
  letter-spacing: -0.03em;
  display: flex; align-items: baseline; gap: 6px;
  background: linear-gradient(180deg, #fef3c7 0%, #fbbf24 55%, #d97706 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 3px 12px rgba(251,191,36,.35));
}
.earn-val small {
  font-size: 12px; color: #d97706; font-weight: 800;
  letter-spacing: 0.08em;
  -webkit-text-fill-color: #d97706;
}
.trend-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.02em;
}
.trend-chip.up { background: rgba(34,197,94,.14); color: #4ade80; border: 1px solid rgba(34,197,94,.3); }
.trend-chip.down { background: rgba(239,68,68,.14); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }
.trend-chip.flat { background: rgba(148,163,184,.14); color: #cbd5e1; border: 1px solid rgba(148,163,184,.3); }
.trend-chip svg { flex-shrink: 0; }
.trend-chip.down svg { transform: scaleY(-1); }

.stat-tiles {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
  position: relative; z-index: 3;
  margin-bottom: 14px;
}
.stile {
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), transparent 50%),
    rgba(6,10,20,.55);
  border: 1px solid rgba(148,163,184,.12);
  border-radius: 14px;
  padding: 10px 6px 8px;
  text-align: center;
  position: relative;
  transition: transform .15s, border-color .15s;
}
.stile:hover { transform: translateY(-1px); border-color: rgba(251,191,36,.28); }
.stile-ico {
  width: 16px; height: 16px;
  color: #94a3b8;
  margin: 0 auto 3px;
  display: block;
}
.stile b {
  display: block; font-size: 15px; color: #fff; font-weight: 800;
  letter-spacing: -0.01em; margin-bottom: 1px;
}
.stile span {
  color: var(--muted); font-size: 10px;
  letter-spacing: 0.04em; text-transform: uppercase;
}

.sparkline-wrap {
  background: rgba(6,10,20,.55);
  border: 1px solid rgba(148,163,184,.10);
  border-radius: 14px;
  padding: 10px 12px 8px;
  position: relative; z-index: 3;
}
.sl-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 4px;
}
.sl-title {
  color: var(--muted); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 600;
}
.sl-sub {
  color: #fbbf24; font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sparkline {
  width: 100%; height: 44px; display: block;
}
#sparkDots circle {
  fill: #fbbf24;
  opacity: 0;
}
#sparkDots circle:last-of-type {
  opacity: 1;
  filter: drop-shadow(0 0 4px #fbbf24);
}

/* ---------- 3D Mine banner ---------- */
.go-card {
  margin-top: 14px;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, rgba(20,30,48,.9), rgba(12,20,34,.85));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 14px;
  backdrop-filter: blur(20px);
  cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform .18s;
}
.go-card:hover { transform: translateY(-2px); }
.go-card::before {
  content: ''; position: absolute;
  right: -30px; top: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(56,189,248,.22), transparent 60%);
}
.go-ico {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, #0284c7, #075985);
  display: grid; place-items: center;
  color: #e0f2fe;
  font-size: 24px;
  box-shadow: 0 8px 18px rgba(2,132,199,.4), inset 0 1px 0 rgba(255,255,255,.28);
}
.go-card h3 { margin: 0; font-size: 15px; color: #fff; font-weight: 700; }
.go-card p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.go-btn {
  margin-left: auto;
  background: linear-gradient(90deg, #f59e0b, #ea580c);
  color: #1a0f00; border: 0; border-radius: 999px;
  padding: 8px 16px; font-weight: 700; font-size: 13px;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 6px 14px rgba(245,158,11,.4), inset 0 1px 0 rgba(255,255,255,.3);
}

/* ---------- Quick actions ---------- */
.quick {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 10px;
  margin: 18px 4px 8px;
}
.qbtn {
  text-align: center; color: var(--text-soft); font-size: 11px;
  cursor: pointer; font-weight: 500;
  transition: transform .15s;
}
.qbtn:active { transform: scale(0.94); }
.qround {
  width: 54px; height: 54px; border-radius: 50%;
  margin: 0 auto 6px;
  background:
    radial-gradient(circle at 30% 25%, rgba(203,213,225,.16), transparent 55%),
    linear-gradient(135deg, #1e293b, #0f172a 80%);
  border: 1px solid rgba(148,163,184,.22);
  display: grid; place-items: center; font-size: 22px;
  box-shadow: 0 6px 14px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);
}
.qpill {
  min-width: 130px; height: 46px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(245,158,11,0.42);
  color: var(--gold-hi); font-weight: 700; font-size: 13px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.1);
}
.qpill:active { transform: scale(0.97); }

/* ---------- Mine hero button (premium metallic) ---------- */
.mine-wrap {
  display: flex; flex-direction: column; align-items: center;
  margin: 14px 0 22px; position: relative;
}
.mine-wrap::before {
  content: ''; position: absolute;
  width: 240px; height: 240px; border-radius: 50%;
  top: 50%; left: 50%; transform: translate(-50%, -60%);
  background: radial-gradient(circle, rgba(245,158,11,.38), transparent 60%);
  filter: blur(30px); pointer-events: none;
  animation: heroPulse 3.6s ease-in-out infinite;
}
@keyframes heroPulse {
  0%,100% { opacity: .85; transform: translate(-50%,-60%) scale(1); }
  50%     { opacity: 1; transform: translate(-50%,-60%) scale(1.08); }
}
.mine-btn {
  width: 172px; height: 172px; border-radius: 50%;
  border: 0; cursor: pointer;
  position: relative;
  padding: 5px;
  background: conic-gradient(from 210deg, #78350f, #f59e0b, #fde68a, #f59e0b, #78350f);
  box-shadow:
    0 0 42px rgba(245,158,11,.5),
    0 20px 40px rgba(0,0,0,.55),
    inset 0 0 0 2px rgba(0,0,0,.35);
  isolation: isolate;
  transition: transform .12s ease;
}
.mine-btn::before {
  content: ''; position: absolute; inset: -10px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(251,191,36,.55) 50%, transparent 100%);
  animation: spinner 5s linear infinite;
  z-index: -1;
  opacity: 0.9;
}
.mine-btn::after {
  content: ''; position: absolute; inset: 5px; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.28), transparent 42%),
    radial-gradient(circle at 50% 50%, #1e2939 0%, #0a1220 68%);
  box-shadow: inset 0 4px 14px rgba(0,0,0,.55), inset 0 -3px 10px rgba(245,158,11,.18);
  z-index: 0;
}
.mine-btn:hover { filter: brightness(1.06); }
.mine-btn:active { transform: scale(0.96); }
.mine-btn:active::before { animation-play-state: paused; }
@keyframes spinner { to { transform: rotate(360deg); } }
.mine-btn span {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  color: #fde68a; font-weight: 900; font-size: 15px;
  letter-spacing: 0.16em; text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0,0,0,.7);
}
.mine-btn .axe {
  width: 60px; height: 60px;
  color: #fbbf24;
  filter: drop-shadow(0 4px 10px rgba(251,191,36,.55));
  animation: pickBob 2.4s ease-in-out infinite;
}
@keyframes pickBob {
  0%,100% { transform: rotate(-4deg); }
  50%     { transform: rotate(4deg); }
}
/* click ripple */
.mine-ripple {
  position: absolute; border-radius: 50%;
  border: 2px solid rgba(251,191,36,.65);
  pointer-events: none; opacity: 0;
  animation: ripple .9s ease-out forwards;
}
@keyframes ripple {
  from { transform: scale(0.6); opacity: 0.85; }
  to   { transform: scale(2.2); opacity: 0; }
}
.remain {
  margin-top: 12px; color: var(--muted); font-size: 13px;
  background: rgba(16,24,38,.6);
  border: 1px solid var(--card-border);
  padding: 6px 14px; border-radius: 999px;
}
.remain b { color: #fde68a; font-weight: 700; }

/* ---------- Notice card ---------- */
.notice {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.notice h3 {
  margin: 0 0 10px; font-size: 14px;
  display: flex; align-items: center; gap: 6px;
  color: var(--text-soft);
}
.marquee {
  overflow: hidden; white-space: nowrap;
  color: #fde68a; font-size: 12px; margin-bottom: 12px;
  background: rgba(6,10,20,.55);
  padding: 8px 12px; border-radius: 10px;
  border: 1px solid rgba(148,163,184,.10);
}
.marquee span { display: inline-block; padding-left: 100%; animation: mq 24s linear infinite; }
@keyframes mq { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
table.prob { width: 100%; border-collapse: collapse; font-size: 12px; }
table.prob th {
  color: var(--muted); font-weight: 500; text-align: left;
  padding: 6px 4px; letter-spacing: 0.02em;
}
table.prob td {
  padding: 9px 4px; border-top: 1px solid rgba(255,255,255,.04);
  color: var(--text-soft);
}
table.prob td:first-child {
  color: #fbbf24; font-weight: 700;
}
table.prob td:last-child, table.prob th:last-child {
  text-align: right; color: var(--gold); font-weight: 700;
}

/* ---------- Tab bar ---------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 6px calc(8px + var(--safe-bottom));
  background: rgba(6, 10, 20, 0.92);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 10;
}
.tab {
  background: none; border: 0;
  color: #536078; font-size: 10.5px; font-weight: 500;
  font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 12px;
  transition: color .18s;
  position: relative;
}
.tab .ico {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  transition: transform .2s;
}
.tab .ico svg { width: 22px; height: 22px; }
.tab.active { color: #fbbf24; }
.tab.active .ico {
  transform: translateY(-2px);
  filter: drop-shadow(0 4px 10px rgba(245,158,11,.65));
}
.tab.active::before {
  content: ''; position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 32px; height: 32px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.4), transparent 70%);
  z-index: -1;
}

/* ---------- Pages ---------- */
.page { display: none; animation: pageIn .3s ease; }
.page.show { display: block; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 3D Hex mine (isometric SVG tiles) ---------- */
.hex-stage {
  flex: 1; overflow: hidden; position: relative;
  background:
    radial-gradient(ellipse at 50% 25%, rgba(245,158,11,.14), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(2,132,199,.18), transparent 65%),
    linear-gradient(180deg, #0a1220 0%, #05080f 60%, #0a1220 100%);
}
.hex-stage::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 15% 20%, rgba(203,213,225,.55), transparent 55%),
    radial-gradient(1px 1px at 82% 30%, rgba(251,191,36,.45), transparent 55%),
    radial-gradient(1px 1px at 35% 65%, rgba(203,213,225,.45), transparent 55%),
    radial-gradient(1px 1px at 72% 78%, rgba(56,189,248,.35), transparent 55%),
    radial-gradient(2px 2px at 55% 40%, rgba(255,255,255,.30), transparent 55%);
  pointer-events: none;
  animation: caveDust 12s linear infinite alternate;
}
@keyframes caveDust {
  from { transform: translateY(0); opacity: .75; }
  to   { transform: translateY(-10px); opacity: 1; }
}
.hex-stage::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 320px; height: 320px;
  transform: translate(-50%, -40%);
  background: radial-gradient(circle, rgba(245,158,11,.22), transparent 60%);
  filter: blur(32px);
  pointer-events: none;
}
.hex-world {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  animation: worldIn .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes worldIn {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.86); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.hex-row {
  display: flex; justify-content: center;
  margin-bottom: -22px;
  position: relative;
}
.hex-row:nth-child(even) { margin-left: 30px; }
.hex {
  width: 60px; height: 72px;
  margin: 0 1px;
  position: relative;
  cursor: pointer;
  transition: transform .12s ease;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.6));
}
.hex svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hex:hover { transform: translateY(-2px); z-index: 5; }
.hex:hover .hex-top { filter: brightness(1.15); }
.hex.hitting { animation: hexHit .32s cubic-bezier(.36,.07,.19,.97); }
@keyframes hexHit {
  0%, 100% { transform: translate(0,0) rotate(0); }
  15% { transform: translate(-2px,1px) rotate(-1.2deg); }
  30% { transform: translate(2px,-1px) rotate(1.2deg); }
  50% { transform: translate(-1px,2px) rotate(-.6deg); }
  70% { transform: translate(1px,0) rotate(.4deg); }
}
.hex.dead {
  transform: translateY(4px) scale(.85);
  opacity: .35;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)) grayscale(.7);
}
.hex.dead .hex-hp { opacity: 0; }
.hex .hex-cracks { transition: opacity .25s; }
.hex .hex-hp text { font-family: 'Inter', sans-serif; }
.hex .glow-ring {
  fill: none; stroke: rgba(251,191,36,.55); stroke-width: 1.2;
  opacity: 0; transition: opacity .15s;
}
.hex:hover .glow-ring { opacity: 1; }

.miner {
  position: absolute; z-index: 8;
  pointer-events: none;
  transition: left .3s cubic-bezier(.36,1.4,.7,1), top .3s cubic-bezier(.36,1.4,.7,1);
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.7));
}
.miner.swing { animation: minerSwing .32s ease; }
@keyframes minerSwing {
  0%, 100% { transform: rotate(0); }
  30% { transform: rotate(-12deg); }
  70% { transform: rotate(6deg); }
}

/* Particle FX layer */
.fx-layer {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
}
.chip-fx {
  position: absolute;
  width: 8px; height: 8px; border-radius: 2px;
  background: linear-gradient(180deg, #a0a4b5, #4a505e);
  animation: chipFly .7s ease-out forwards;
}
.spark-fx {
  position: absolute;
  width: 3px; height: 3px; border-radius: 50%;
  background: #fde68a;
  box-shadow: 0 0 8px #fbbf24;
  animation: sparkFly .5s ease-out forwards;
}
@keyframes chipFly {
  0%   { transform: translate(0,0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx,0), var(--dy,-40px)) rotate(var(--rot,180deg)); opacity: 0; }
}
@keyframes sparkFly {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx,0), var(--dy,-30px)) scale(.2); opacity: 0; }
}

/* Hex-page chrome */
.hex-page { display: none; flex-direction: column; height: 100%; position: relative; z-index: 5; }
.hex-page.show { display: flex; }
.hex-top {
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + var(--safe-top)) 12px 10px;
  background: linear-gradient(180deg, rgba(5,8,15,.85), transparent);
}
.hex-top .back {
  background: rgba(16,24,38,.75);
  border: 1px solid var(--card-border);
  color: var(--text-soft);
  border-radius: 12px; padding: 8px 12px; font-size: 12px;
  cursor: pointer; font-family: inherit;
}
.chip {
  background: rgba(16,24,38,.75);
  border: 1px solid var(--card-border);
  border-radius: 999px; padding: 6px 12px; font-size: 12px;
  display: flex; align-items: center; gap: 6px;
  color: var(--text-soft);
}
.chip b { color: var(--gold); font-weight: 700; }
.plus {
  width: 34px; height: 34px; border-radius: 12px;
  border: 1px solid rgba(245,158,11,.5);
  background: linear-gradient(135deg, #1f2937, #0b1220);
  color: var(--gold-hi); font-size: 14px;
  cursor: pointer; font-family: inherit;
}
.hex-bot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 10px 14px calc(14px + var(--safe-bottom));
  background: linear-gradient(0deg, rgba(5,8,15,.95), rgba(5,8,15,.85));
  border-top: 1px solid rgba(148,163,184,.14);
}
.hex-bot button {
  background: none; border: 0; color: var(--text-soft);
  font-size: 12px; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 10px;
}
.bomb {
  background: rgba(69,26,3,.75) !important;
  border: 1px solid rgba(251,146,60,.5) !important;
  color: var(--gold-hi) !important;
  border-radius: 999px !important;
  padding: 8px 16px !important;
  font-weight: 700 !important;
}

/* ---------- Modals ---------- */
.modal {
  position: fixed; inset: 0;
  background: rgba(2,6,15,.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
  animation: fadeIn .2s ease;
}
.modal.show { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 380px;
  background:
    radial-gradient(circle at 50% 0%, rgba(245,158,11,.28), transparent 60%),
    linear-gradient(180deg, #1a2438 0%, #0e1626 60%, #0a1220 100%);
  border: 1px solid var(--card-border-strong);
  border-radius: 24px;
  padding: 22px;
  text-align: center;
  position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06);
  animation: sheetIn .28s cubic-bezier(.34,1.56,.64,1);
}
@keyframes sheetIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sheet h3 { margin: 0 0 14px; font-size: 17px; font-weight: 700; color: #fff; }
.sheet.list { text-align: left; max-height: 82vh; overflow: auto; }

.ore-ico {
  font-size: 62px;
  margin-top: -6px;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.55));
  animation: bump .4s ease;
}
@keyframes bump { from { transform: translateY(-8px) scale(0.8); opacity: 0; } to { transform: none; opacity: 1; } }
.depth { color: var(--muted); margin: 6px 0 12px; font-size: 13px; }
.got {
  font-size: 34px; font-weight: 800; color: var(--gold);
  letter-spacing: -0.02em;
  text-shadow: 0 4px 20px rgba(251,191,36,.6);
}
.got small { font-size: 15px; color: var(--gold-hi); font-weight: 700; margin-left: 4px; }
.earned {
  color: var(--muted); margin: 0 0 14px; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.2em;
}
.balbar {
  background: rgba(6,10,20,.6);
  border: 1px solid rgba(148,163,184,.10);
  border-radius: 12px; padding: 10px 12px;
  color: #cbd5e1; font-size: 13px; margin-bottom: 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.balbar span { color: var(--gold); font-weight: 700; }
.float-plus {
  position: absolute; right: 32px; top: 46%;
  color: var(--gold); font-weight: 700; font-size: 16px;
  animation: up 1.1s ease-out forwards;
  pointer-events: none;
}
@keyframes up {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-50px); }
}

/* ---------- Records ---------- */
.rec-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.clear {
  background: rgba(63,18,25,.6);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,.32);
  border-radius: 10px; padding: 6px 12px; font-size: 12px;
  cursor: pointer; font-family: inherit;
}
.rec-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.rec-item .amt { margin-left: auto; color: var(--gold); font-weight: 700; }
.rec-item .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---------- Withdraw ---------- */
.wd-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
  backdrop-filter: blur(20px);
}
.wd-status { font-size: 12px; font-weight: 700; }
.wd-status.pending { color: #fbbf24; }
.wd-status.approved { color: #4ade80; }
.wd-status.rejected { color: #f87171; }

/* ---------- Profile ---------- */
.profile-head {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 4px 16px;
}
.avatar {
  width: 68px; height: 68px; border-radius: 50%;
  background: linear-gradient(135deg, #334155, #0f172a);
  display: grid; place-items: center; font-size: 32px;
  position: relative; color: #cbd5e1;
  border: 2px solid rgba(245,158,11,.35);
  box-shadow: 0 10px 22px rgba(0,0,0,.4);
}
.avatar i {
  position: absolute; right: -2px; bottom: -2px; font-size: 12px;
  background: #fbbf24; color: #111827; border-radius: 50%;
  width: 22px; height: 22px; display: grid; place-items: center;
  font-style: normal; font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.uid { color: #94a3b8; font-size: 12px; margin-top: 2px; font-family: 'SF Mono', 'Menlo', monospace; }
.badge {
  display: inline-block;
  background: rgba(63,18,25,.7); color: #fca5a5;
  border-radius: 8px; padding: 2px 10px; font-size: 11px;
  margin-top: 6px; font-weight: 600; letter-spacing: 0.03em;
}
.badge.ok { background: rgba(6,78,59,.6); color: #6ee7b7; }
.badge.wait { background: rgba(59,42,10,.6); color: #fbbf24; }

.invite {
  display: flex; align-items: center;
  background:
    radial-gradient(circle at 100% 100%, rgba(245,158,11,.14), transparent 60%),
    linear-gradient(135deg, rgba(20,30,48,.9), rgba(12,20,34,.85));
  border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 14px 16px;
  margin-bottom: 14px;
}
.invite .code {
  color: var(--gold); font-size: 24px; font-weight: 800;
  letter-spacing: 0.08em;
}
.copy {
  margin-left: auto;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #1a0f00; border: 0; border-radius: 10px;
  padding: 8px 14px; font-weight: 700; cursor: pointer;
  font-family: inherit; font-size: 13px;
  box-shadow: 0 6px 14px rgba(245,158,11,.35);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.statc {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 14px;
  backdrop-filter: blur(20px);
  transition: transform .15s;
}
.statc:hover { transform: translateY(-1px); }
.statc b {
  display: block; color: var(--gold); font-size: 20px;
  font-weight: 800; letter-spacing: -0.02em;
}
.statc span { color: var(--muted); font-size: 12px; }

.menu {
  margin-top: 14px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); overflow: hidden;
  backdrop-filter: blur(20px);
}
.menu a, .menu button {
  display: flex; width: 100%; align-items: center; gap: 12px;
  padding: 16px; background: none; border: 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  color: #fff; text-align: left; font-size: 14px;
  cursor: pointer; font-family: inherit;
}
.menu button:last-child { border-bottom: 0; }
.menu button > span:first-child {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, #1e293b, #0b1220);
  display: grid; place-items: center; font-size: 16px;
  border: 1px solid rgba(148,163,184,.10);
}
.menu .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.menu .arr { margin-left: auto; color: #536078; font-size: 20px; }

/* ---------- Check-in ---------- */
.check-days {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px; margin: 14px 0;
}
.check-days > div {
  background: rgba(16,24,38,.6);
  border: 1px solid rgba(148,163,184,.10);
  border-radius: 12px;
  padding: 10px 4px; font-size: 11px; color: var(--muted);
  text-align: center;
}
.check-days > div.on {
  background: linear-gradient(135deg, #b45309, #f59e0b);
  color: #1a0f00; border-color: rgba(251,191,36,.6);
  box-shadow: 0 8px 14px rgba(245,158,11,.4);
}
.check-days > div.done {
  background: rgba(6,78,59,.5); color: #6ee7b7;
  border-color: rgba(52,211,153,.32);
}

/* ---------- Toast + loading ---------- */
.toast {
  position: fixed;
  left: 50%; top: 20%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(12,20,34,.95);
  color: #fff;
  padding: 12px 20px; border-radius: 12px;
  z-index: 500;
  border: 1px solid var(--card-border-strong);
  box-shadow: 0 20px 40px rgba(0,0,0,.6);
  font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  max-width: 90%;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.loading {
  position: fixed;
  left: 50%; top: 30%;
  transform: translateX(-50%);
  background: rgba(12,20,34,.92);
  padding: 14px 32px; border-radius: 14px;
  z-index: 400;
  border: 1px solid var(--card-border);
  color: var(--text);
  display: none;
  font-weight: 500;
}
.loading::before {
  content: '';
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(251,191,36,.2);
  border-top-color: #fbbf24;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: -3px;
  animation: spin .8s linear infinite;
}
.loading.show { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Chat ---------- */
.chat {
  display: flex; flex-direction: column;
  height: 400px; text-align: left;
}
.chat-list {
  flex: 1; overflow: auto;
  padding: 4px 2px;
  background: rgba(6,10,20,.55);
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.10);
  padding: 12px;
}
.msg {
  margin: 8px 0; max-width: 85%;
  padding: 10px 12px; border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.4;
  word-wrap: break-word; white-space: pre-wrap;
  animation: msgIn .25s ease;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.msg.admin {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(148,163,184,.15);
  border-bottom-left-radius: 4px;
}
.msg.user {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #1a0f00;
  margin-left: auto;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(245,158,11,.32);
}
.chat-send { display: flex; gap: 8px; margin-top: 10px; }
.chat-send input { flex: 1; margin: 0; }

/* ---------- Empty ---------- */
.empty {
  color: var(--muted); text-align: center;
  padding: 40px 20px;
  font-size: 14px;
}

/* ---------- Payment groups ---------- */
.pay-group-label {
  text-align: center;
  color: #fbbf24;
  letter-spacing: 2.5px;
  font-size: 10px;
  font-weight: 700;
  margin: 18px 0 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}
.pay-group-label:first-of-type { border-top: 0; padding-top: 0; margin-top: 8px; }

/* ---------- Shop items ---------- */
#shopList .rec-item { padding: 14px 0; }
#shopList .rec-item button {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #1a0f00; border: 0; border-radius: 10px;
  padding: 8px 14px; font-weight: 700; cursor: pointer;
  font-family: inherit; font-size: 12px;
}
