/* Layout: sticky top bar, content column + ad sidebar that stacks on phones. One dark "mining room" look. */
:root {
  --bg: #0d0f12;
  --panel: #15181d;
  --panel-2: #1c2027;
  --line: #2a2f38;
  --fg: #e8e6e1;
  --muted: #8d939c;
  --amber: #f7931a;
  --amber-ink: #1a1205;
  --amber-soft: #f7931a22;
  --good: #3ecf8e;
  --bad: #ff6b6b;
  --warn: #f2c94c;
  --f-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font-family: var(--f-body); font-size: 15px; line-height: 1.55; }
a { color: var(--amber); }
h1, h2, h3 { font-family: var(--f-display); margin: 0; text-wrap: balance; letter-spacing: .01em; }
h1 { font-size: 24px; } h2 { font-size: 18px; }
.mono, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .small { font-size: 12px; } .center { text-align: center; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.page { padding-block: 20px 40px; }
.narrow { max-width: 760px; }
.stack { display: flex; flex-direction: column; gap: 20px; }

.dev-banner { background: var(--warn); color: #222; text-align: center; padding: 6px 16px; font-size: 13px; font-weight: 600; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 5; background: var(--panel); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; font-family: var(--f-display); font-size: 19px; font-weight: 700; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; }
.nav a:hover, .nav a.active { color: var(--fg); background: var(--panel-2); }
.who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bal { font-size: 13px; color: var(--muted); margin-right: 4px; }
.bal .num { color: var(--amber); font-size: 16px; font-weight: 700; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 6px; padding: 10px 16px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:disabled { cursor: not-allowed; opacity: .5; }
.btn-primary { width: 100%; background: var(--amber); color: var(--amber-ink); font-family: var(--f-display); font-size: 17px; letter-spacing: .04em; padding: 12px 18px; }
.btn-primary:disabled { background: var(--panel-2); color: var(--muted); opacity: 1; }
.btn-amber { background: var(--amber); color: var(--amber-ink); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--fg); padding: 7px 12px; font-size: 13px; }
.btn-ghost:hover:not(:disabled) { border-color: var(--amber); }
.btn-ghost.danger:hover:not(:disabled) { border-color: var(--bad); color: var(--bad); }

/* panels */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.main-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.side-col { position: sticky; top: 76px; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .side-col { position: static; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px; min-width: 0; scroll-margin-top: 140px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head .sub { font-size: 12px; color: var(--muted); }
.lead { color: var(--muted); margin: 0 0 12px; max-width: 65ch; }

/* ads */
.ad { margin-block: 0 20px; display: flex; justify-content: center; overflow: hidden; }
.ad-empty { border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 12px; align-items: center; letter-spacing: .1em; text-transform: uppercase; }
.ad-top.ad-empty, .ad-bottom.ad-empty, .ad-middle.ad-empty { min-height: 90px; }
.ad-side.ad-empty { min-height: 250px; }
.ad-bottom { margin-block: 20px; }

/* faucet */
.roll-display { display: flex; justify-content: center; gap: 6px; margin: 16px 0; }
.digit { width: 56px; height: 72px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; font-family: var(--f-mono); font-size: 36px; font-weight: 700; }
.digit.hit { color: var(--amber); border-color: var(--amber); }
@media (max-width: 420px) { .digit { width: 46px; height: 60px; font-size: 28px; } }
.result { min-height: 24px; text-align: center; margin-top: 12px; font-weight: 600; }
.result .num { color: var(--amber); }
/* withdraw */
.progress-wrap { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.progress-label { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.progress { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--amber); transition: width .4s ease; }
.progress-wrap.ready .progress i { background: var(--good); }
.progress-wrap.ready .progress-label { color: var(--good); }
.chips { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.chips button { background: var(--panel-2); border: 1px solid var(--line); color: var(--fg); border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
.chips button:hover { border-color: var(--amber); color: var(--amber); }
.summary { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.summary div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.summary dt { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; }
.payouts { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; }
.payouts li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.payouts li .num { color: var(--good); text-align: right; }
.payouts li .muted { grid-column: 1 / -1; }

/* VIP club */
.vip-badge { flex: none; vertical-align: middle; }
.rank { display: inline-flex; align-items: center; gap: 8px; }
.vip-hero { display: flex; gap: 24px; align-items: center; margin-bottom: 20px; }
.vip-hero-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.vip-hero-body .label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.vip-hero-body h1 { font-size: 30px; }
.vip-hero-body .lead { margin: 0; }
@media (max-width: 520px) { .vip-hero { flex-direction: column; align-items: flex-start; gap: 12px; } }
.vip-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .vip-grid { grid-template-columns: 1fr; } }
.xp-list { list-style: none; margin: 0 0 14px; padding: 0; }
.xp-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.xp-list b { font-weight: 600; color: var(--amber); }
.xp-sub { font-size: 15px; margin: 6px 0 4px; }
.vip-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.vip-strip a { margin-left: auto; }
.vip-mult { color: var(--good); }

/* daily streak */
.streak { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.streak-days { min-width: 40px; height: 40px; padding: 0 8px; display: grid; place-items: center; border-radius: 6px; background: var(--amber-soft); color: var(--amber); font-size: 18px; font-weight: 700; }
.streak-plus { color: var(--good); }

/* shortlinks */
.sl-list { display: flex; flex-direction: column; gap: 10px; }
.sl-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.sl-info { display: flex; flex-direction: column; min-width: 0; }
.sl-reward { color: var(--amber); font-weight: 700; white-space: nowrap; }
@media (max-width: 460px) { .sl-item { grid-template-columns: 1fr auto; } .sl-item .btn { grid-column: 1 / -1; } }
/* daily missions & achievements */
.ms-list { display: grid; gap: 10px; }
.ms-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.ms-item.is-done { border-color: color-mix(in srgb, var(--amber) 55%, transparent); }
.ms-item.is-claimed { opacity: .7; }
.ms-bonus { border-style: dashed; }
.ms-check { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--good); font-size: 13px; }
.is-done .ms-check, .is-claimed .ms-check { border-color: color-mix(in srgb, var(--good) 50%, transparent); background: color-mix(in srgb, var(--good) 12%, transparent); }
.ms-bonus .ms-check { color: var(--amber); }
.ms-info { display: grid; gap: 4px; min-width: 0; }
.ms-bar { height: 5px; background: var(--line); border-radius: 99px; overflow: hidden; max-width: 260px; }
.ms-bar i { display: block; height: 100%; background: var(--amber); border-radius: inherit; }
.ms-reward { font-family: var(--f-mono); color: var(--amber); font-weight: 700; white-space: nowrap; }
@media (max-width: 520px) { .ms-item { grid-template-columns: 28px minmax(0, 1fr) auto; } .ms-item > .btn, .ms-item > .pill, .ms-item > .muted { grid-column: 2 / -1; justify-self: start; } }
.ms-hint { display: block; margin-top: 12px; text-align: center; font-size: 14px; color: var(--muted); text-decoration: none; }
.ms-hint.ready { color: var(--amber); font-weight: 600; }
.ms-hint:hover { color: var(--fg); }
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: var(--amber); color: var(--amber-ink); font-size: 11px; font-weight: 700; vertical-align: 1px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ach { display: grid; gap: 4px; align-content: start; padding: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; opacity: .75; }
.ach.earned { opacity: 1; border-color: color-mix(in srgb, var(--amber) 55%, transparent); background: var(--amber-soft); }
.ach-icon { font-size: 14px; color: var(--good); }
/* free games */
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; align-items: start; margin-bottom: 20px; }
.game .btn { width: 100%; }
.wheel-wrap { position: relative; width: min(260px, 100%); margin: 6px auto 10px; aspect-ratio: 1; }
.wheel { width: 100%; height: 100%; display: block; transition: transform 4s cubic-bezier(.17, .67, .2, 1); }
.wheel-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 22px solid var(--amber); z-index: 1; filter: drop-shadow(0 2px 2px #0008); }
.odds { margin-top: 12px; font-size: 13px; color: var(--muted); }
.odds summary { cursor: pointer; }
.odds ul { list-style: none; padding: 0; margin: 8px 0 0; }
.odds li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line); }
.scratch { position: relative; height: 140px; border-radius: 10px; overflow: hidden; margin: 6px 0 10px; background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 50%, transparent); }
.scratch-prize { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-mono); font-size: 34px; font-weight: 700; color: var(--amber); }
.scratch-cover { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; background: repeating-linear-gradient(45deg, #9aa1ab, #9aa1ab 10px, #b7bdc6 10px, #b7bdc6 20px); color: #1d2330; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; transition: opacity .6s, transform .6s; }
.scratch-cover.gone { opacity: 0; transform: scale(1.08); pointer-events: none; }
.box-list { display: grid; gap: 10px; }
.box-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.box-item > div { display: grid; }
.box-item .btn { width: auto; }
.box-icon { font-size: 26px; }
.box-history { margin-top: 12px; }
.result-banner { padding: 10px 14px; border-radius: 6px; font-weight: 600; margin: 0 0 14px; }
.result-banner.ok { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); border: 1px solid color-mix(in srgb, var(--good) 40%, transparent); }
.result-banner.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); }

.btn-respin { width: 100%; margin-top: 10px; background: transparent; color: var(--amber); border: 1px dashed var(--amber); }
.btn-respin:hover:not(:disabled) { background: var(--amber-soft); }
.btn-respin:disabled { color: var(--muted); border-color: var(--line); opacity: 1; }

/* respin ad window */
.modal { position: fixed; inset: 0; z-index: 30; background: rgba(5, 6, 8, .82); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow-y: auto; }
.modal-box { width: min(560px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.ad-window { min-height: 250px; display: flex; justify-content: center; align-items: center; overflow: hidden; background: var(--panel-2); border-radius: 8px; }
.ad-window-empty { width: 100%; min-height: 250px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; }
.timer-bar { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.timer-bar i { display: block; height: 100%; width: 0; background: var(--amber); transition: width .25s linear; }
.modal-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.modal .captcha-box:not(:empty) { margin-bottom: 0; }
#adTimer { margin: 0; }

.captcha-box:not(:empty) { display: flex; justify-content: center; margin-bottom: 12px; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; max-width: 65ch; }
.tips { margin: 0 0 16px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; max-width: 70ch; color: var(--muted); }
.tips b { color: var(--fg); }

/* tables */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.lit td { color: var(--amber); }
.pay-table td { padding-block: 12px; white-space: nowrap; }
.pay-table .muted-cell { color: var(--muted); }
.pay-table tr.lit .muted-cell { color: var(--amber); }
td.pos { color: var(--good); } td.neg { color: var(--bad); }
td.clip { max-width: 220px; overflow-wrap: anywhere; }
td.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.empty { margin: 12px 0 0; }

.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill-available, .pill-paid { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.pill-pending, .pill-sending { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.pill-reversed, .pill-rejected, .pill-failed { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }

/* forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.form-row .field { flex: 1 1 200px; }
.form-row .btn-primary { flex: 1 1 100%; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.field label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 4px; }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.field input, .field select, .field textarea, .panel-head input, .panel-head select {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 10px; min-width: 0;
}
.panel-head input, .panel-head select { width: auto; padding: 6px 10px; }
textarea { resize: vertical; font-family: var(--f-mono); font-size: 13px; }
.inputbox { display: flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.inputbox input { border: 0; background: transparent; }
.inputbox button { background: transparent; border: 0; border-left: 1px solid var(--line); color: var(--muted); padding: 0 12px; cursor: pointer; }
.inputbox button:hover { color: var(--amber); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.form-error { color: var(--bad); margin: 0; min-height: 1em; }
.form-ok { color: var(--good); margin: 0 0 12px; line-height: 1.5; }
.verify-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; background: var(--amber-soft); border-bottom: 1px solid var(--amber); padding: 10px 16px; font-size: 14px; text-align: center; }
.verify-banner b { overflow-wrap: anywhere; }
.warn { background: color-mix(in srgb, var(--warn) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); color: var(--warn); padding: 10px 14px; border-radius: 6px; font-size: 13px; }

.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 14px; color: var(--muted); cursor: pointer; font-family: var(--f-display); font-size: 16px; }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--amber); }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stats > div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stats .label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.stats .big { font-size: 24px; font-weight: 700; color: var(--amber); overflow-wrap: anywhere; }
.stats .muted-num { color: var(--warn); }
.stats .unit { font-size: 12px; color: var(--muted); }

.wall iframe { width: 100%; height: 760px; border: 0; border-radius: 8px; background: #fff; }

.prose { max-width: 70ch; }
.prose h2 { margin-top: 20px; }
.prose li { margin-bottom: 4px; }

.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 18px; }
.footer nav { display: flex; gap: 14px; }
.footer a { color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--amber); padding: 10px 16px; border-radius: 6px; z-index: 20; max-width: calc(100% - 32px); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
