:root {
  --site-glow: rgba(53, 199, 118, .22);
  --avatar-color: #62d89b;
}

html[data-site-theme="midnight"] body {
  --bg: #07101a;
  --panel: rgba(13, 27, 39, .9);
  --panel-2: #122a3a;
  --line: rgba(202, 235, 255, .13);
  background: radial-gradient(circle at 14% 8%, rgba(42, 136, 194, .24), transparent 32%), radial-gradient(circle at 86% 30%, rgba(92, 212, 255, .08), transparent 28%), linear-gradient(155deg, #04090f, #091823 58%, #061018);
}

html[data-site-theme="graphite"] body {
  --bg: #0e0f10;
  --panel: rgba(29, 30, 31, .9);
  --panel-2: #242627;
  --line: rgba(255, 255, 255, .11);
  background: radial-gradient(circle at 18% 10%, rgba(255, 255, 255, .09), transparent 28%), radial-gradient(circle at 90% 24%, rgba(244, 200, 98, .07), transparent 26%), linear-gradient(155deg, #080909, #151718 58%, #0b0c0c);
}

html[data-site-theme="purple"] body {
  --bg: #100a18;
  --panel: rgba(31, 19, 43, .92);
  --panel-2: #2d1d3d;
  --line: rgba(235, 218, 255, .14);
  background: radial-gradient(circle at 12% 8%, rgba(149, 78, 214, .25), transparent 32%), radial-gradient(circle at 88% 28%, rgba(232, 129, 255, .1), transparent 30%), linear-gradient(155deg, #09050f, #1b1026 58%, #100817);
}

html[data-site-theme="red"] body {
  --bg: #15090a;
  --panel: rgba(43, 20, 21, .92);
  --panel-2: #3a1c1e;
  --line: rgba(255, 220, 220, .14);
  background: radial-gradient(circle at 14% 8%, rgba(211, 61, 69, .24), transparent 32%), radial-gradient(circle at 88% 30%, rgba(255, 147, 110, .09), transparent 28%), linear-gradient(155deg, #0d0506, #241012 58%, #130809);
}

html[data-accent="blue"] { --green: #8bd5ff; --green-2: #339ee8; --site-glow: rgba(51, 158, 232, .22); }
html[data-accent="gold"] { --green: #ffe086; --green-2: #dca728; --site-glow: rgba(220, 167, 40, .22); }
html[data-accent="coral"] { --green: #ffaaa4; --green-2: #ed665d; --site-glow: rgba(237, 102, 93, .22); }
html[data-accent="purple"] { --green: #dfb0ff; --green-2: #9856d6; --site-glow: rgba(152, 86, 214, .24); }
html[data-accent="red"] { --green: #ffaaa9; --green-2: #d83d49; --site-glow: rgba(216, 61, 73, .24); }

.maintenance-gate { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 50% 20%, rgba(244,200,98,.12), transparent 35%), #07100c; }
.maintenance-card { width: min(520px, 100%); padding: 48px; border: 1px solid rgba(244,200,98,.22); border-radius: 28px; text-align: center; background: rgba(18,35,25,.94); box-shadow: 0 35px 100px rgba(0,0,0,.55); }
.maintenance-card h1 { margin: 13px 0; font: 44px/1 Georgia, serif; }
.maintenance-card p { margin: 0 auto 25px; color: var(--muted); line-height: 1.65; }
.maintenance-mark { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 22px; border: 1px solid rgba(244,200,98,.35); border-radius: 20px; color: #241801; background: linear-gradient(145deg,#fff0a8,#dca728); font: 900 27px/1 Georgia,serif; }

.server-dot { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }

.checkline { position: relative; }
.checkline input { position: absolute; opacity: 0; pointer-events: none; }
.checkline::before { content: "✓"; flex: 0 0 22px; width: 22px; height: 22px; display: grid; place-items: center; margin-top: 1px; border: 1px solid var(--line); border-radius: 7px; color: transparent; background: rgba(255,255,255,.035); font: 900 13px/1 sans-serif; transition: .2s ease; }
.checkline:has(input:checked)::before { color: #07100c; border-color: var(--green); background: var(--green); box-shadow: 0 0 0 3px var(--site-glow); }
.checkline a { color: var(--green); text-underline-offset: 2px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 17px 0 13px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.discord-btn { position: relative; width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: center; padding-inline: 50px; color: #fff; border-color: rgba(255,255,255,.12); background: #5865f2; overflow: hidden; text-align: center; }
.discord-btn:hover { background: #6875f5; transform: translateY(-1px); }
.discord-btn svg { position: absolute; left: 17px; width: 21px; height: 21px; flex: 0 0 21px; pointer-events: none; }
.discord-btn span { min-width: 0; line-height: 1.25; }
.form-error:empty { display: none; }
.auth-gate { overflow-y: auto; overscroll-behavior: contain; }
.auth-shell { max-height: calc(100dvh - 40px); min-height: 0; }
.auth-story, .auth-card { min-width: 0; min-height: 0; }
.auth-card { overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.auth-panel { min-width: 0; }
.discord-register-intro { display: grid; gap: 16px; margin-top: 25px; }
.discord-register-intro p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.discord-profile-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 13px; border: 1px solid rgba(88,101,242,.32); border-radius: 14px; background: rgba(88,101,242,.09); }
.discord-profile-avatar { flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center; overflow: hidden; border-radius: 14px; color: #fff; background: #5865f2; font-weight: 900; }
.discord-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.discord-profile-card > div:last-child { min-width: 0; }
.discord-profile-card small, .discord-profile-card strong, .discord-profile-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discord-profile-card small { color: #aeb6ff; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.discord-profile-card strong { margin: 3px 0 1px; }
.discord-profile-card span { color: var(--muted); font-size: 11px; }
.notification-btn { position: relative; width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: rgba(255,255,255,.045); cursor: pointer; }
.notification-btn b { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; border: 2px solid #0c1812; border-radius: 99px; color: #08110d; background: var(--green); font-size: 9px; }
.bell-shape { width: 14px; height: 15px; position: relative; display: block; border: 2px solid currentColor; border-top-left-radius: 9px; border-top-right-radius: 9px; border-bottom: 0; }
.bell-shape::after { content: ""; position: absolute; left: -4px; right: -4px; bottom: -4px; height: 2px; border-radius: 9px; background: currentColor; box-shadow: 6px 4px 0 -1px currentColor; }
.coin-mark { width: 22px; height: 22px; display: grid; place-items: center; border: 2px solid #8f681c; border-radius: 50%; color: #382506; background: radial-gradient(circle at 30% 24%, #fff0ad, var(--gold) 58%, #a87924); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); font: 900 9px/1 Georgia, serif; }
.balance-pill { position: relative; }
.balance-pill.balance-up { animation: balanceUp .55s ease; }
.balance-pill.balance-down { animation: balanceDown .55s ease; }
.balance-delta { position: absolute; left: 50%; top: 42px; z-index: 80; pointer-events: none; color: var(--green); font-size: 12px; font-weight: 900; animation: balanceDelta 1.35s ease forwards; }
.balance-delta.down { color: var(--red); }
@keyframes balanceUp { 50% { transform: translateY(-2px); box-shadow: 0 0 0 5px var(--site-glow); } }
@keyframes balanceDown { 50% { transform: translateY(2px); box-shadow: 0 0 0 5px rgba(255,107,114,.14); } }
@keyframes balanceDelta { from { opacity: 0; transform: translate(-50%, 10px); } 25% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -24px); } }

.game-layout { align-items: stretch; }
.game-stage { align-content: center; }
.game-result { position: static; width: 100%; transform: none; padding: 14px 16px; text-align: left; border-radius: 13px; box-shadow: none; backdrop-filter: none; background: rgba(143,240,173,.055); animation: resultSlide .25s ease; }
.game-result strong { margin: 4px 0; font-size: 22px; }
.game-result.lose { background: rgba(255,107,114,.06); }
.game-message:empty { display: none; }
.game-message { min-height: 0; }
@keyframes resultSlide { from { opacity: 0; transform: translateY(-7px); } }

.mine-toolbar { width: min(500px, 100%); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.mine-metric { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.14); }
.mine-metric span { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.mine-metric strong { display: block; margin-top: 4px; color: var(--green); font-size: 14px; }
.mine-cell { position: relative; overflow: hidden; }
.mine-cell.hit { outline: 2px solid var(--red); outline-offset: 2px; animation: mineHit .38s ease; }
.mine-cell.safe-hit { box-shadow: inset 0 0 25px rgba(143,240,173,.11), 0 0 0 2px rgba(143,240,173,.2); }
@keyframes mineHit { 35% { transform: scale(.86) rotate(-3deg); } }
.gem { width: 32px; height: 32px; margin: auto; display: grid; grid-template-columns: 1fr 1fr; transform: rotate(45deg); gap: 2px; filter: drop-shadow(0 5px 9px rgba(143,240,173,.25)); }
.gem i { display: block; background: linear-gradient(135deg, #e5ffec, var(--green-2)); }
.gem i:nth-child(1) { border-radius: 6px 1px 1px 1px; }
.gem i:nth-child(2) { opacity: .72; border-radius: 1px 6px 1px 1px; }
.gem i:nth-child(3) { opacity: .62; border-radius: 1px 1px 1px 6px; }
.gem i:nth-child(4) { opacity: .88; border-radius: 1px 1px 6px 1px; }
.mine-choice { grid-template-columns: repeat(4, 1fr); }

.coin { width: 190px; height: 190px; padding: 0; overflow: visible; text-align: center; }
.coin-odds { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: var(--muted); font-size: 11px; font-weight: 800; }
.coin-odds strong { color: var(--green); }
.die { font-size: 86px; }
.die.rolling { animation: diceRollFinal .9s cubic-bezier(.18,.76,.22,1); }
@keyframes diceRollFinal { 15% { transform: translateY(-60px) rotate(75deg) scale(.9); } 42% { transform: translateY(-25px) rotate(190deg); } 72% { transform: translateY(-8px) rotate(310deg) scale(1.04); } 100% { transform: rotate(356deg); } }

.jackpot-line { width: min(760px, 100%); }
.jackpot-strip { width: max-content; min-width: 100%; padding-inline: calc(50% - 60px); will-change: transform; transform: translateX(0); }
.jackpot-entry { position: relative; flex: 0 0 120px; }
.jackpot-entry.winner { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(244,200,98,.12), 0 10px 40px rgba(244,200,98,.16); }
.chance-avatar { --chance: 0; width: 48px; height: 48px; display: grid; place-items: center; padding: 4px; border-radius: 16px; background: conic-gradient(var(--green) calc(var(--chance) * 1%), rgba(255,255,255,.08) 0); }
.chance-avatar .avatar { width: 40px; height: 40px; background: var(--avatar-color); }
.chance-tag { position: absolute; top: 6px; right: 6px; padding: 3px 5px; border-radius: 99px; color: #07100c; background: var(--green); font-size: 8px; font-weight: 900; }

.legal-copy { max-height: min(62vh, 640px); overflow-y: auto; padding-right: 10px; color: var(--muted); line-height: 1.7; }
.legal-copy h4 { margin: 20px 0 6px; color: var(--ink); font: 700 18px/1.25 Georgia, serif; }
.legal-copy h4:first-child { margin-top: 0; }
.legal-copy p { margin: 0 0 10px; }
.legal-copy ul { margin: 0 0 12px; padding-left: 20px; }
.legal-copy li { margin: 5px 0; }
.legal-version { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11px; }

.transfer-shell { width: min(980px, 100%); margin: 0 auto; display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 18px; }
.wallet-card { position: relative; overflow: hidden; min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; padding: 30px; border: 1px solid rgba(244,200,98,.24); border-radius: 25px; background: radial-gradient(circle at 90% 12%, rgba(244,200,98,.18), transparent 30%), linear-gradient(145deg, #173022, #0e1e16); box-shadow: var(--shadow); }
.wallet-card::after { content: "K"; position: absolute; right: -8px; bottom: -42px; color: rgba(255,255,255,.04); font: 180px/1 Georgia, serif; }
.wallet-card strong { position: relative; z-index: 1; font: 42px/1 Georgia, serif; color: var(--gold); }
.transfer-form-card { padding: 30px; }
.fee-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fee-old { color: var(--muted); text-decoration: line-through; }
.transfer-history { width: min(980px,100%); margin: 18px auto 0; }

.bonus-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 14px; }
.bonus-amount { padding: 24px; border: 1px solid rgba(244,200,98,.22); border-radius: 18px; background: linear-gradient(145deg, rgba(244,200,98,.11), rgba(255,255,255,.02)); }
.bonus-amount strong { display: block; margin: 10px 0; color: var(--gold); font: 42px/1 Georgia, serif; }
.countdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.countdown span { padding: 11px 6px; border: 1px solid var(--line); border-radius: 12px; text-align: center; background: rgba(255,255,255,.035); }
.countdown b { display: block; font-size: 19px; }
.countdown small { color: var(--muted); font-size: 8px; text-transform: uppercase; }

.notification-list { display: grid; gap: 8px; }
.notification-group { display: grid; gap: 6px; }
.notification-group-header { color: var(--green); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 4px 8px; background: var(--site-glow); border-radius: 8px; }
.notification-item { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.03); }
.notification-item time { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; }

.settings-section { display: grid; gap: 16px; }
.settings-security { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.settings-security h3 { margin: 5px 0 9px; font: 28px/1.1 Georgia, serif; }
.settings-security > p { margin: 0 0 18px; line-height: 1.55; }
.password-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.avatar-name-row { display: flex; align-items: center; gap: 15px; }
.avatar-name-row label { flex: 1; min-width: 0; }
.visual-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.visual-option { min-height: 76px; display: grid; align-content: end; padding: 12px; border: 2px solid transparent; border-radius: 14px; cursor: pointer; text-align: left; background: #15281e; }
.visual-option.active { border-color: var(--green); box-shadow: 0 0 0 3px var(--site-glow); }
.visual-option[data-theme-option="midnight"] { background: linear-gradient(145deg,#16364c,#091722); }
.visual-option[data-theme-option="graphite"] { background: linear-gradient(145deg,#3a3b3c,#151617); }
.accent-picker, .avatar-picker { display: flex; gap: 9px; flex-wrap: wrap; }
.color-dot { width: 43px; height: 43px; border: 3px solid transparent; border-radius: 13px; cursor: pointer; background: var(--dot); }
.color-dot.active { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.09); }
.avatar-preview { width: 78px; height: 78px; border-radius: 22px; font-size: 24px; background: var(--avatar-color); }

.admin-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; }
.admin-card { padding: 26px; }
.admin-users { grid-column: 1 / -1; }
.admin-user { display: grid; grid-template-columns: minmax(160px,1fr) 115px minmax(300px,auto); align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.admin-user:last-child { border-bottom: 0; }
.admin-user input { width: 115px; }
.admin-user-summary { min-width: 0; overflow-wrap: anywhere; }
.admin-user-actions { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.admin-user-actions .btn { padding: 9px 11px; font-size: 10px; }
.admin-protected { align-self: center; font-size: 10px; }
.admin-stats { margin-bottom: 18px; }
.admin-news-list { margin-top: 18px; }
.limits-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.modal-wrap { z-index: 180; overflow-y: auto; }
.modal { max-width: calc(100vw - 24px); }
.page-card, .profile-content, .game-stage, .game-controls, .transfer-form-card { min-width: 0; }
.control-row { flex-wrap: wrap; }
.topbar-inner, .brand, .user-area, main, .view { min-width: 0; }
.history-row, .rank-row, .section-head, .support-card { max-width: 100%; }

@media (max-width: 800px) {
  .transfer-shell, .bonus-grid, .admin-layout { grid-template-columns: 1fr; }
  .admin-users { grid-column: auto; }
  .admin-user { grid-template-columns: minmax(0,1fr) 115px; }
  .admin-user-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .visual-picker { grid-template-columns: 1fr; }
  .mine-toolbar { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .notification-btn { width: 36px; height: 36px; }
  .topbar-inner { width: min(100% - 18px, 1240px); }
  .balance-pill { font-size: 10px; gap: 5px; padding: 7px 8px; }
  .coin-mark { width: 19px; height: 19px; }
  .user-btn .avatar { width: 34px; height: 34px; }
  .game-controls { padding: 23px 18px; }
  .mine-cell { border-radius: 9px; }
  .gem { width: 23px; height: 23px; }
  .profile-nav { grid-template-columns: repeat(5, minmax(0,1fr)); }
  .profile-nav button { font-size: 8px; }
  .wallet-card { min-height: 210px; }
  .admin-user { grid-template-columns: 1fr; }
  .admin-user input { width: 100%; }
  .admin-user-actions { grid-column: auto; display: grid; grid-template-columns: 1fr 1fr; }
  .admin-user-actions .btn { width: 100%; }
  .password-grid { grid-template-columns: 1fr; }
  .auth-gate { display: block; padding: 10px; }
  .auth-shell { width: 100%; max-height: none; min-height: calc(100dvh - 20px); margin: 0 auto; border-radius: 22px; }
  .auth-card { justify-content: flex-start; overflow: visible; padding: 30px 21px; }
  .modal-wrap { padding: 10px; }
  .modal { max-height: calc(100dvh - 20px); padding: 22px 18px; border-radius: 19px; }
}

@media (max-width: 480px) {
  .auth-card h2 { font-size: 29px !important; }
  .discord-btn { padding-inline: 45px; font-size: 12px; }
  .discord-btn svg { left: 15px; }
  .avatar-name-row { align-items: stretch; flex-direction: column; }
  .avatar-preview { align-self: center; }
  .admin-user-actions { grid-template-columns: 1fr; }
  .limits-grid, .countdown { grid-template-columns: 1fr; }
  .profile-content { padding: 22px 16px; }
  .profile-sidebar { padding: 24px 18px; }
  .ref-code { align-items: stretch; flex-direction: column; }
  .ref-code code { overflow-wrap: anywhere; }
  .rank-row { overflow: hidden; }
  .rank-row > strong { font-size: 10px; }
  .topbar-inner { gap: 6px; }
  .brand { max-width: 92px; overflow: hidden; }
  .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
  .notification-btn { flex: 0 0 34px; }
  .balance-pill { min-width: 0; padding-inline: 6px; }
  .balance-pill strong { overflow: hidden; text-overflow: ellipsis; }
  .game-stage { min-height: 350px; }
}

@media (max-height: 720px) and (min-width: 721px) {
  .auth-story { min-height: 0; padding: 32px; }
  .auth-story h1 { margin-top: 18px; font-size: 46px; }
  .auth-points { margin-top: 22px; }
  .auth-card { padding: 30px 34px; justify-content: flex-start; }
}

/* Profile, notifications and server administration */
html[data-site-theme]:not([data-site-theme="forest"]) .topbar,
html[data-site-theme]:not([data-site-theme="forest"]) .mobile-nav,
html[data-site-theme]:not([data-site-theme="forest"]) .user-menu { background: color-mix(in srgb, var(--panel-2) 92%, transparent); }
html[data-site-theme]:not([data-site-theme="forest"]) .page-card,
html[data-site-theme]:not([data-site-theme="forest"]) .game-card,
html[data-site-theme]:not([data-site-theme="forest"]) .info-card,
html[data-site-theme]:not([data-site-theme="forest"]) .stat-card,
html[data-site-theme]:not([data-site-theme="forest"]) .news-card { background-color: color-mix(in srgb, var(--panel) 95%, transparent); }
html[data-site-theme]:not([data-site-theme="forest"]) .wallet-card,
html[data-site-theme]:not([data-site-theme="forest"]) .premium-box { background: radial-gradient(circle at 90% 12%, var(--site-glow), transparent 32%), linear-gradient(145deg, var(--panel-2), var(--bg)); }

.user-menu .fi { width: 18px; display: inline-flex; justify-content: center; font-size: 15px; }
.mobile-nav .fi { display: inline-flex; line-height: 1; }
.notification-scroll { max-height: min(62vh, 620px); overflow-y: auto; padding-right: 7px; scrollbar-gutter: stable; }
.notification-kind { display: block; width: max-content; margin-bottom: 7px; padding: 4px 7px; border-radius: 99px; color: var(--green); background: var(--site-glow); font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }

.settings-section fieldset { min-width: 0; display: grid; gap: 16px; margin: 0; padding: 0; border: 0; }
.settings-locked fieldset { opacity: .48; }
.vip-lock-note { display: grid; gap: 5px; margin-bottom: 20px; padding: 15px 17px; border: 1px solid rgba(244,200,98,.22); border-radius: 14px; background: rgba(244,200,98,.07); }
.vip-lock-note strong { color: var(--gold); }
.vip-lock-note span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.visual-picker { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.visual-option[data-theme-option="purple"] { background: linear-gradient(145deg,#61358a,#170d22); }
.visual-option[data-theme-option="red"] { background: linear-gradient(145deg,#7d2830,#1b090b); }
.vip-buy { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.vip-price { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.vip-price-old { color: rgba(35,24,2,.58); text-decoration: line-through; }
.vip-price strong { font-size: 14px; }
.vip-discount { padding: 3px 6px; border-radius: 99px; color: #fff; background: #bb2f3a; font-size: 9px; }

.admin-tabs { display: flex; gap: 6px; margin-bottom: 19px; padding: 6px; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: rgba(0,0,0,.13); scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs button { flex: 1 0 auto; min-width: 118px; padding: 12px 16px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.admin-tabs button.active { color: #07100c; background: var(--green); box-shadow: 0 8px 28px var(--site-glow); }
.admin-title { margin: 8px 0 20px; font: 30px/1 Georgia, serif; }
.bot-status { display: flex; align-items: center; gap: 8px; margin: -6px 0 18px; color: var(--muted); font-size: 11px; }
.bot-status span { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px rgba(255,107,114,.45); }
.bot-status.ready span { background: var(--green); box-shadow: 0 0 12px var(--site-glow); }
.delivery-result { display: grid; gap: 4px; margin-top: 13px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); }
.delivery-result strong { color: var(--green); }
.delivery-result span { color: var(--muted); font-size: 10px; line-height: 1.45; }

.admin-player-layout { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.7fr); gap: 18px; align-items: start; }
.admin-player-list, .admin-player-detail { min-width: 0; }
.admin-search-results { display: grid; gap: 7px; max-height: 620px; margin-top: 13px; overflow-y: auto; }
.admin-player-row { width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid transparent; border-radius: 12px; color: var(--ink); background: rgba(255,255,255,.025); cursor: pointer; text-align: left; }
.admin-player-row:hover, .admin-player-row.active { border-color: var(--green); background: var(--site-glow); }
.admin-player-row .avatar { width: 40px; height: 40px; }
.admin-player-row span { min-width: 0; }
.admin-player-row strong, .admin-player-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-player-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.admin-player-row b { font-size: 8px; }
.admin-empty { min-height: 330px; display: grid; place-content: center; gap: 7px; color: var(--muted); text-align: center; }
.admin-empty strong { color: var(--ink); font: 28px/1 Georgia,serif; }
.admin-detail-head { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.admin-detail-head > div:nth-child(2) { min-width: 0; flex: 1; }
.admin-detail-head h2 { margin: 5px 0 3px; font: 34px/1 Georgia,serif; overflow-wrap: anywhere; }
.admin-detail-avatar { flex: 0 0 62px; width: 62px; height: 62px; border-radius: 18px; font-size: 18px; }
.status-chip { padding: 6px 8px; border-radius: 99px; color: var(--green); background: var(--site-glow); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.status-chip.frozen { color: #8bd5ff; background: rgba(51,158,232,.15); }
.status-chip.banned { color: #ffaaa9; background: rgba(216,61,73,.15); }
.admin-player-stats { grid-template-columns: repeat(3, 1fr); margin-bottom: 14px; }
.admin-referrals { margin-bottom: 17px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; }
.admin-referrals summary, .admin-limits summary { cursor: pointer; font-size: 11px; font-weight: 800; }
.admin-referrals-list { display: grid; gap: 6px; max-height: 200px; overflow-y: auto; margin-top: 11px; }
.admin-referral-item { padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.04); font-size: 10px; line-height: 1.5; }
.admin-referral-item small { color: var(--muted); margin-left: 8px; }
.restriction-reason, .admin-readonly-note { margin: 0 0 15px; padding: 11px 13px; border: 1px solid rgba(255,107,114,.18); border-radius: 12px; color: var(--muted); background: rgba(255,107,114,.055); font-size: 10px; line-height: 1.5; }
.admin-readonly-note { border-color: var(--line); background: rgba(255,255,255,.03); }
.admin-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.admin-box { align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.1); }
.admin-box h3 { margin: 0; font-size: 15px; }
.admin-box p { margin: 0; font-size: 9px; line-height: 1.5; }
.admin-detail-actions { justify-content: flex-start; margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.admin-promo-list { display: grid; gap: 8px; }
.admin-promo { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.admin-promo:last-child { border-bottom: 0; }
.admin-promo div { min-width: 0; }
.admin-promo strong, .admin-promo span { display: block; overflow-wrap: anywhere; }
.admin-promo span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.permission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; border: 0; }
.permission-grid legend { margin-bottom: 8px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.permission-check { display: flex; align-items: center; gap: 7px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; }
.permission-check input { width: auto; }
.maintenance-toggle { display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; }
.maintenance-toggle input { width: auto; accent-color: var(--green); }
.maintenance-toggle span { display: grid; gap: 3px; }
.maintenance-toggle small { color: var(--muted); }
.admin-limits { padding: 14px; border: 1px solid var(--line); border-radius: 13px; }
.admin-limits .limits-grid { margin-top: 13px; }

@media (max-width: 980px) {
  .visual-picker { grid-template-columns: repeat(3, 1fr); }
  .admin-player-layout { grid-template-columns: 1fr; }
  .admin-search-results { max-height: 320px; }
}

@media (max-width: 640px) {
  .maintenance-card { padding: 34px 23px; }
  .maintenance-card h1 { font-size: 34px; }
  .visual-picker, .admin-player-stats, .admin-detail-grid { grid-template-columns: 1fr; }
  .vip-buy { align-items: stretch; flex-direction: column; }
  .vip-price { justify-content: flex-start; }
  .admin-card { padding: 21px 16px; }
  .admin-detail-head { align-items: flex-start; flex-wrap: wrap; }
  .admin-detail-head .status-chip { margin-left: 77px; }
  .permission-grid { grid-template-columns: 1fr; }
}
