/* ═══════════════════════════════════════
   New Painel Styles
═══════════════════════════════════════ */
:root {
  --bg-0: #060e07;
  --bg-1: #091409;
  --text: #fbf7ff;
  --muted: rgba(251,247,255,0.72);
  --edge: rgba(255,255,255,0.14);
  --shadow: 0 26px 90px rgba(0,0,0,0.55);
  --radius: 22px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background:
    linear-gradient(rgba(0,0,0,0.60), rgba(0,0,0,0.60)),
    url('../img/bg-desktop.jpg') center center / cover no-repeat fixed;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.container { width: min(1080px, calc(100% - 44px)); margin: 0 auto; }
.hidden { display: none !important; }

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(14px); background: rgba(6,14,7,0.88);
  border-bottom: 1px solid rgba(255,234,0,0.16);
}
.topbar-inner {
  height: 64px; display: flex; align-items: center;
  justify-content: space-between; gap: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 10px 26px rgba(0,0,0,0.45)); }
.right { display: inline-flex; align-items: center; gap: 10px; }
.pill {
  height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid rgba(255,234,0,0.22); background: rgba(255,234,0,0.07);
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 850; font-family: var(--mono); letter-spacing: 0.4px;
}
.pill small { font-weight: 900; font-size: 11px; opacity: 0.72; text-transform: uppercase; }
.tag {
  height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid rgba(89,255,0,0.28); background: rgba(89,255,0,0.10);
  color: rgba(200,255,180,0.95); display: inline-flex; align-items: center; gap: 8px;
  font-weight: 950; font-family: var(--mono); letter-spacing: 0.9px;
  text-transform: uppercase; font-size: 11px;
}
.tag .dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: rgba(34,197,94,0.95);
  box-shadow: 0 0 0 5px rgba(34,197,94,0.14), 0 0 18px rgba(34,197,94,0.45);
}
.avatar {
  width: 40px; height: 40px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06);
  display: grid; place-items: center; font-weight: 950; font-family: var(--mono);
  cursor: pointer;
}
.wrap { min-height: 100%; display: flex; flex-direction: column; position: relative; z-index: 1; }
.main { flex: 1 1 auto; padding-bottom: 88px; }

/* ── Hero ── */
.hero {
  position: relative; min-height: 480px;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 20px 50px; overflow: hidden;
}
.hero-content {
  position: relative; z-index: 1; text-align: center;
  width: min(540px, 100%);
}
.balance-label {
  font-size: 11px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: rgba(255,234,0,0.82);
  font-family: var(--mono); margin-bottom: 8px;
}
.balance-value {
  font-family: var(--mono); font-size: clamp(38px, 8vw, 58px);
  letter-spacing: -1px; font-weight: 950; color: #fff;
  text-shadow: 0 4px 32px rgba(0,0,0,0.55); margin-bottom: 24px;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 22px; }
.game-panel { text-align: left; }
.dash-sections { padding: 0 0 20px; }

/* ── Buttons ── */
.btn {
  height: 46px; padding: 0 14px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06);
  cursor: pointer; font-weight: 900; font-family: var(--mono);
  text-transform: uppercase; letter-spacing: 0.7px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  user-select: none; transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn.is-copied { border-color: rgba(34,197,94,0.34); background: rgba(34,197,94,0.10); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn:hover { transform: translateY(-1px); background: rgba(255,255,255,0.29); border-color: rgba(255,255,255,0.18); }
.btn:active { transform: translateY(0); }
.btn-primary {
  border-color: rgba(255,234,0,0.50);
  background: linear-gradient(135deg, #FFEA00, #59FF00);
  color: #1a3a00; box-shadow: 0 8px 32px rgba(255,234,0,0.35);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); background: linear-gradient(135deg, #FFEA00, #59FF00); }
.btn-danger {
  border-color: rgba(89,255,0,0.45);
  background: linear-gradient(135deg, #59FF00, #FFEA00);
  color: #1a3a00; box-shadow: 0 8px 32px rgba(89,255,0,0.28);
}
.btn-danger:hover { filter: brightness(1.08); transform: translateY(-1px); background: linear-gradient(135deg, #59FF00, #FFEA00); }

/* ── Note ── */
.note {
  margin-top: 16px; border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(0,0,0,0.18);
  padding: 14px; display: flex; gap: 10px; align-items: flex-start;
  color: rgba(251,247,255,0.74); font-weight: 750;
}
.note b { font-family: var(--mono); }

/* ── Card ── */
.card {
  margin-top: 16px; border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(6,14,7,0.70);
  overflow: hidden; position: relative;
}
.card-inner { padding: 18px; position: relative; z-index: 1; }
.card h2 { margin: 0; font-size: 18px; letter-spacing: -0.2px; }
.card p { margin: 8px 0 0; color: rgba(255,255,255,0.72); font-weight: 650; }

/* ── Game panel ── */
.play-row { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; }
.seg {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05);
  padding: 8px; border-radius: 18px;
}
.seg-scroll { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg-scroll .chip { flex: 0 0 auto; white-space: nowrap; }
.chip {
  height: 36px; padding: 0 12px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(0,0,0,0.18);
  font-weight: 900; font-family: var(--mono); letter-spacing: 0.4px;
  cursor: pointer; user-select: none;
}
.chip[aria-pressed="true"] {
  border-color: rgba(255,234,0,0.40); background: rgba(255,234,0,0.14); color: #FFEA00;
}
.entry {
  width: 100%; margin-top: 12px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(0,0,0,0.18);
  padding: 14px; display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-weight: 950; font-size: 26px;
}
.entry span { opacity: 0.74; }
.entry input {
  flex: 1 1 auto; border: 0; outline: none; background: transparent;
  color: rgba(251,247,255,0.92); font: inherit; min-width: 0;
}
.cta-play {
  margin-top: 14px; width: 100%; height: 56px; border-radius: 22px; border: none;
  background: linear-gradient(135deg, #FFEA00 0%, #59FF00 100%);
  color: #1a3a00; font-weight: 950; font-family: var(--mono);
  letter-spacing: 1px; text-transform: uppercase; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 8px 32px rgba(255,234,0,0.35);
  transition: filter 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.cta-play svg { width: 18px; height: 18px; }
.cta-play:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 12px 44px rgba(255,234,0,0.50); }
.cta-play:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: none; box-shadow: none; }

/* ── Winners ── */
.winners {
  margin-top: 16px; border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(6,14,7,0.70);
  overflow: hidden; box-shadow: var(--shadow); position: relative;
}
.winners-inner { position: relative; z-index: 1; padding: 16px; }
.winners-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.winners-head b { font-family: var(--mono); letter-spacing: 0.8px; text-transform: uppercase; font-size: 13px; }
.winners-viewport {
  height: 260px; border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.10); background: rgba(0,0,0,0.18);
  overflow: hidden; position: relative;
}
.winners-viewport::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,14,7,0.92), rgba(6,14,7,0.00) 18%, rgba(6,14,7,0.00) 82%, rgba(6,14,7,0.92));
  pointer-events: none;
}
.winners-track { will-change: transform; }
.win-row {
  padding: 12px 14px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.win-row:first-child { border-top: 0; }
.win-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.win-ava {
  width: 36px; height: 36px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06);
  display: grid; place-items: center; font-weight: 950; font-family: var(--mono);
  color: rgba(251,247,255,0.92); flex: 0 0 auto;
}
.win-meta { display: grid; gap: 2px; min-width: 0; }
.win-meta b { font-weight: 950; letter-spacing: 0.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-meta small { color: rgba(251,247,255,0.66); font-weight: 700; }
.win-right { text-align: right; display: grid; gap: 2px; flex: 0 0 auto; }
.win-right b { font-family: var(--mono); color: rgba(34,197,94,0.95); letter-spacing: 0.4px; }
.win-right small { color: rgba(251,247,255,0.66); font-weight: 700; }

/* ── Bottom nav ── */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(6,14,7,0.22), rgba(6,14,7,0.92));
  border-top: 1px solid rgba(255,234,0,0.14); z-index: 30;
}
.nav-inner { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; align-items: center; }
.nav-btn {
  height: 44px; border-radius: 16px;
  border: 1px solid rgba(255,234,0,0.14); background: rgba(255,234,0,0.04);
  cursor: pointer; font-weight: 900; font-family: var(--mono);
  text-transform: uppercase; letter-spacing: 0.8px; font-size: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-btn svg { width: 18px; height: 18px; }
.nav-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Modals ── */
.modal { position: fixed; inset: 0; display: none; z-index: 50; align-items: center; justify-content: center; padding: 18px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.62); backdrop-filter: blur(8px); }
.sheet {
  position: relative; width: min(720px, 100%); max-height: calc(100dvh - 36px);
  border-radius: 26px; border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, rgba(10,22,10,0.88), rgba(6,14,7,0.97));
  box-shadow: 0 30px 90px rgba(0,0,0,0.55); overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(10px) scale(0.98); opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
  color: #fff;
}
.modal.open .sheet { transform: translateY(0) scale(1); opacity: 1; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.sheet-head b { font-size: 16px; letter-spacing: -0.2px; color: #fff; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06);
  display: grid; place-items: center; cursor: pointer;
}
.sheet-body {
  padding: 14px 16px 16px; display: grid; gap: 12px;
  overflow: auto; -webkit-overflow-scrolling: touch;
  flex: 1 1 auto; min-height: 0;
}
.sheet-banner { width: 100%; border-radius: 18px 18px 0 0; overflow: hidden; flex: 0 0 auto; line-height: 0; }
.sheet-banner img { width: 100%; height: auto; display: block; }

/* ── Form fields ── */
.field label {
  display: block; font-weight: 850; font-size: 12px;
  letter-spacing: 0.8px; text-transform: uppercase;
  font-family: var(--mono); color: rgba(255,255,255,0.90); margin-bottom: 6px;
}
.input {
  width: 100%; height: 46px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(6,14,7,0.70);
  color: #fff; padding: 0 12px; font-weight: 750; outline: none;
  font-family: var(--mono);
}
.input::placeholder { color: rgba(255,255,255,0.40); }
.input:focus { border-color: rgba(89,255,0,0.48); box-shadow: 0 0 0 4px rgba(89,255,0,0.10); }

/* ── Referral ── */
.ref-grid { display: grid; gap: 10px; }
.ref-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
@media (max-width: 680px) { .ref-stats { grid-template-columns: repeat(2, 1fr); } }

/* ── Deposit status ── */
@keyframes depositSpin { to { transform: rotate(360deg); } }
@keyframes depositPulse { 0%, 100% { opacity: 0.72; } 50% { opacity: 1; } }
.deposit-status {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 10px; padding: 14px 12px;
  border-radius: 16px; border: 1px solid rgba(255,255,255,0.10); background: rgba(0,0,0,0.22);
}
.deposit-loader {
  width: 28px; height: 28px; border-radius: 999px;
  border: 3px solid rgba(255,255,255,0.18); border-top-color: rgba(89,255,0,0.92);
  animation: depositSpin 0.9s linear infinite;
  box-shadow: 0 0 0 6px rgba(89,255,0,0.06);
}
.deposit-status-text { font-weight: 950; letter-spacing: 0.2px; }
.deposit-status-text.pulse { animation: depositPulse 1.1s ease-in-out infinite; }
.deposit-status-amount { font-family: var(--mono); font-weight: 950; letter-spacing: 0.6px; opacity: 0.92; }

/* ── How to play ── */
.how-section { padding: 48px 0 20px; }
.how-header { text-align: center; margin-bottom: 32px; }
.how-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; color: #FFEA00;
  background: rgba(255,234,0,0.10); border: 1px solid rgba(255,234,0,0.22);
  border-radius: 999px; padding: 5px 14px; margin-bottom: 12px; font-family: var(--mono);
}
.how-title { font-size: clamp(22px, 4vw, 32px); font-weight: 900; letter-spacing: -0.3px; color: #fff; margin: 0 0 8px; }
.how-sub { font-size: 14px; color: rgba(255,255,255,0.60); margin: 0; }
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.how-card {
  border-radius: 16px; border: 1px solid rgba(89,255,0,0.15);
  background: rgba(8,20,8,0.82); backdrop-filter: blur(10px);
  overflow: hidden; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.40);
}
.how-card:hover { transform: translateY(-4px); border-color: rgba(89,255,0,0.35); box-shadow: 0 8px 32px rgba(0,0,0,0.55); }
.how-img-wrap { position: relative; width: 100%; aspect-ratio: 16/10; overflow: hidden; }
.how-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.how-card:hover .how-img-wrap img { transform: scale(1.04); }
.how-num {
  position: absolute; top: 10px; left: 12px; width: 32px; height: 32px;
  border-radius: 8px; background: rgba(0,0,0,0.70);
  border: 1.5px solid rgba(89,255,0,0.55);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; color: #59FF00; backdrop-filter: blur(4px);
}
.how-body { padding: 14px 16px 18px; }
.how-card h3 { font-size: 14px; font-weight: 700; margin: 0 0 6px; color: #fff; }
.how-card p { font-size: 12px; color: rgba(255,255,255,0.62); margin: 0; line-height: 1.55; }
.how-cta { text-align: center; padding: 4px 0 8px; }

/* ── Toast ── */
.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  padding: 10px 12px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(0,0,0,0.50);
  backdrop-filter: blur(10px); color: rgba(251,247,255,0.92);
  font-weight: 850; font-family: var(--mono); letter-spacing: 0.4px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease; z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

/* ── Orbs ── */
.dash-orb {
  position: fixed; border-radius: 50%; filter: blur(80px);
  pointer-events: none; z-index: 0;
  animation: dashOrbFloat 8s ease-in-out infinite alternate;
}
.dash-orb-1 { width: 500px; height: 500px; background: rgba(255,234,0,0.07); top: -100px; left: -80px; }
.dash-orb-2 { width: 400px; height: 400px; background: rgba(89,255,0,0.07); bottom: -80px; right: -80px; animation-delay: -3s; }
.dash-orb-3 { width: 350px; height: 350px; background: rgba(89,255,0,0.05); top: 45%; left: 50%; transform: translate(-50%,-50%); animation-delay: -5s; }
@keyframes dashOrbFloat { from { transform: translate(0,0) scale(1); } to { transform: translate(28px,18px) scale(1.07); } }
.dash-orb-3 { animation-name: dashOrbFloat3; }
@keyframes dashOrbFloat3 { from { transform: translate(-50%,-50%) scale(1); } to { transform: translate(calc(-50% + 22px), calc(-50% + 14px)) scale(1.05); } }

/* ── Responsive ── */
@media (max-width: 860px) { .how-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .play-row { flex-direction: column; align-items: stretch; }
  .seg { width: 100%; max-width: 100%; }
  .input { font-size: 16px; }
}
@media (max-width: 520px) {
  .container { width: calc(100% - 28px); }
  .nav-btn { font-size: 10px; letter-spacing: 0.6px; }
  .hero { padding: 60px 16px 36px; min-height: 400px; }
}
@media (max-width: 480px) { .how-grid { grid-template-columns: 1fr; } }
