/* ===================================================================
   Bada Bing — serious casino club interface
   =================================================================== */

:root {
  --bg: #0b0c0f;
  --panel: #14161b;
  --panel-2: #0e1014;
  --line: rgba(200, 164, 92, .2);
  --line-soft: rgba(255, 255, 255, .07);
  --gold: #c8a45c;
  --gold-l: #e3c98e;
  --wine: #7b1c2b;
  --wine-l: #b85360;
  --green: #6aa583;
  --red: #b85261;
  --text: #ece9df;
  --muted: #989589;
  --shadow: 0 22px 55px rgba(0, 0, 0, .5);
  --radius: 2px;
  --nav-h: 64px;
  --serif: Georgia, "Times New Roman", "Playfair Display", serif;
  --sans: "Segoe UI", Arial, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

/* Атрибут hidden всегда прячет элемент, даже если ниже есть display */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 10, 13, .93), rgba(9, 10, 13, .97)),
    url("../assets/photo-casino.jpg") center / cover no-repeat;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, transparent 45%, rgba(0, 0, 0, .55) 100%);
  pointer-events: none;
  z-index: -1;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--gold-l); }
::selection { background: var(--gold); color: #14120c; }

/* Убираем стрелки у числовых полей — они выглядят как «квадратики» у суммы */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2c2e34; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: #454850; }

/* ---------- общие элементы ---------- */
.brand { display: flex; align-items: center; gap: 12px; user-select: none; }

.brand-mark {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold-l);
  font: 26px/1 var(--serif);
  background: #111319 url("../assets/logo.jpg") center / cover no-repeat;
}

.brand-name {
  font: normal 25px/1 var(--serif);
  letter-spacing: .4px;
  color: var(--gold-l);
}
.brand-name .slash { color: var(--wine-l); margin-left: 2px; }
.brand-sub { font-size: 8px; letter-spacing: 3.6px; color: var(--muted); margin-top: 6px; }

.btn {
  border: 1px solid var(--line-soft);
  background: #1a1d23;
  color: var(--text);
  padding: 11px 19px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  transition: background .18s, border-color .18s, color .18s, transform .18s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.btn-gold {
  border-color: var(--gold);
  background: linear-gradient(180deg, #d3b476, #a98646);
  color: #17140d;
}
.btn-gold:hover { background: linear-gradient(180deg, #e2c98f, #b99651); }

.btn-red {
  border-color: var(--wine-l);
  background: linear-gradient(180deg, #8d2938, #601620);
  color: #f6e9ea;
}
.btn-red:hover { background: linear-gradient(180deg, #a13343, #6e1b27); }

.btn-outline {
  border-color: rgba(200, 164, 92, .45);
  background: transparent;
  color: var(--gold-l);
}
.btn-outline:hover { border-color: var(--gold); background: rgba(200, 164, 92, .08); }

.btn-ghost { background: rgba(255, 255, 255, .03); }
.btn-sm { padding: 7px 11px; font-size: 10px; letter-spacing: 1px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-size: 10px; color: var(--muted); letter-spacing: 1.4px;
  text-transform: uppercase; font-weight: 700;
}
.input {
  width: 100%;
  background: #0c0e12;
  border: 1px solid var(--line-soft);
  color: var(--text);
  padding: 12px 14px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(200, 164, 92, .1); }
.input::placeholder { color: #66645e; }
textarea.input { resize: vertical; }

.badge {
  display: inline-flex; align-items: center;
  padding: 4px 8px; border-radius: var(--radius);
  font-size: 9px; font-weight: 700; letter-spacing: 1.1px;
  text-transform: uppercase; border: 1px solid var(--line);
  color: var(--gold-l); background: rgba(200, 164, 92, .07);
}
.badge-pending { color: var(--gold-l); border-color: rgba(200, 164, 92, .35); }
.badge-approved { color: #9ecdb2; border-color: rgba(106, 165, 131, .35); background: rgba(106, 165, 131, .08); }
.badge-rejected { color: #dfa0a9; border-color: rgba(184, 82, 97, .4); background: rgba(184, 82, 97, .09); }

.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- загрузка ---------- */
.loading {
  display: grid; place-items: center; align-content: center;
  min-height: 100vh; background: #0b0c0f; text-align: center;
}
.loading-mark {
  width: 82px; height: 82px; display: grid; place-items: center;
  border: 1px solid var(--gold); color: var(--gold-l);
  font: 48px/1 var(--serif); margin-bottom: 22px;
  background: #111319 url("../assets/logo.jpg") center / cover no-repeat;
  animation: slow-pulse 1.8s ease-in-out infinite;
}
.loading-name { font: normal 26px/1 var(--serif); color: var(--gold-l); }
.loading-name .slash { color: var(--wine-l); }
.loading-sub { font-size: 9px; letter-spacing: 4px; color: var(--muted); margin-top: 12px; }

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(200, 164, 92, .25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin-slow .8s linear infinite;
}

/* ---------- авторизация ---------- */
.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 460px) minmax(0, 1fr);
  max-width: 1060px;
  margin: 0 auto;
  padding: 46px 24px;
}

.auth-card {
  background: rgba(15, 16, 20, .97);
  border: 1px solid var(--line);
  border-right: 0;
  padding: 34px 36px;
  display: flex; flex-direction: column; justify-content: center;
  animation: fadeUp .4s both;
}

.auth-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(200, 164, 92, 0));
  margin: 26px 0 22px;
}

.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 24px;
}
.auth-tab {
  border: 0; border-bottom: 2px solid transparent;
  background: transparent; color: var(--muted);
  padding: 11px 8px;
  font-size: 10px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
}
.auth-tab.active { color: var(--gold-l); border-bottom-color: var(--gold); }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form[hidden] { display: none; }
.auth-submit { margin-top: 4px; padding: 13px; }

.auth-note {
  margin-top: 24px; padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px; color: var(--muted); text-align: center; line-height: 1.7;
}

.avatar-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.avatar-option {
  width: 42px; height: 42px; border-radius: var(--radius);
  border: 1px solid var(--line-soft); background: #111319;
  font-size: 20px; display: grid; place-items: center; transition: .16s;
}
.avatar-option:hover { border-color: rgba(200, 164, 92, .5); }
.avatar-option.selected { border-color: var(--gold); background: rgba(200, 164, 92, .12); }
.avatar-upload { position: relative; overflow: hidden; color: var(--muted); font-size: 17px; }
.avatar-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.auth-visual {
  position: relative;
  border: 1px solid var(--line);
  min-height: 520px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 38px;
  background: url("../assets/photo-vintage.jpg") center / cover no-repeat;
}
.auth-visual::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(9, 10, 13, .2) 0%, rgba(9, 10, 13, .78) 55%, rgba(9, 10, 13, .96) 100%);
}
.auth-visual-inner, .auth-visual-footer { position: relative; z-index: 1; }
.auth-visual-kicker { font-size: 9px; letter-spacing: 4px; color: var(--gold); }
.auth-visual-title { font: normal 38px/1.14 var(--serif); margin: 14px 0 18px; color: #f1ecdf; }
.auth-visual-line { width: 54px; height: 1px; background: var(--gold); margin-bottom: 16px; }
.auth-visual-text { font-size: 10px; letter-spacing: 1.6px; color: #c3bdae; text-transform: uppercase; }
.auth-visual-footer { font-size: 9px; letter-spacing: 2.6px; color: var(--muted); margin-top: 30px; }

/* ---------- основной экран ---------- */
#mainScreen { min-height: 100vh; padding-bottom: calc(var(--nav-h) + 26px); }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px clamp(14px, 4vw, 40px);
  background: rgba(10, 11, 14, .95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar .brand-mark { width: 34px; height: 34px; font-size: 19px; }
.topbar .brand-name { font-size: 18px; }
.topbar .brand-sub { display: none; }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.balance-pill {
  display: flex; flex-direction: column; align-items: flex-end;
  line-height: 1.2;
  padding-right: 14px;
  border-right: 1px solid var(--line-soft);
}
.balance-label { font-size: 9px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.balance-pill b { font: normal 18px/1.2 var(--serif); color: var(--gold-l); font-variant-numeric: tabular-nums; }

.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 11px 5px 5px; border-radius: var(--radius);
  background: #121419; border: 1px solid var(--line-soft);
  color: var(--text);
}
.user-chip:hover { border-color: rgba(200, 164, 92, .45); }
.avatar {
  width: 32px; height: 32px; border-radius: var(--radius);
  display: grid; place-items: center; font-size: 17px;
  background: #22252c; object-fit: cover; overflow: hidden;
  border: 1px solid var(--line-soft);
}
.user-chip span:last-child { font-size: 12px; font-weight: 700; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

main { max-width: 1180px; margin: 0 auto; padding: 26px clamp(14px, 3vw, 28px); }
.view { animation: fadeUp .3s both; }
.view[hidden] { display: none; }

/* ---------- герой ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 300px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(9, 10, 13, .97) 0%, rgba(9, 10, 13, .86) 42%, rgba(9, 10, 13, .32) 100%),
    url("../assets/photo-roulette.jpg") center 45% / cover no-repeat;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(26px, 4vw, 46px);
  box-shadow: var(--shadow);
}
.hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); }
.hero-kicker { color: var(--gold); font-weight: 700; letter-spacing: 4px; font-size: 9px; text-transform: uppercase; }
.hero h1 { margin: 14px 0 10px; font: normal clamp(34px, 5vw, 52px)/1.06 var(--serif); letter-spacing: -.5px; }
.hero h1 em { font-style: italic; color: var(--gold-l); }
.hero p { margin: 0; color: #c3c0b6; max-width: 470px; font-size: 13px; line-height: 1.7; }
.hero-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 36px 0 16px; }
.section-head h2 {
  margin: 0; font: normal 26px/1.1 var(--serif); letter-spacing: .2px;
  padding-left: 14px; position: relative;
}
.section-head h2::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; background: var(--gold); }
.section-head p { margin: 6px 0 0 14px; color: var(--muted); font-size: 12px; }

/* ---------- карточки игр ---------- */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }

.game-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: var(--panel);
  padding: 0; text-align: left; color: var(--text);
  min-height: 272px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  animation: fadeUp .4s both;
}
.game-card:hover { transform: translateY(-3px); border-color: rgba(200, 164, 92, .5); box-shadow: 0 16px 38px rgba(0, 0, 0, .45); }
.game-card:disabled { opacity: .45; cursor: not-allowed; }

.game-preview {
  height: 164px; display: grid; place-items: center; position: relative; overflow: hidden;
  background-image: var(--game-photo);
  background-size: cover; background-position: center;
  filter: saturate(.6);
}
.game-preview::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 9, 12, .28), rgba(8, 9, 12, .88));
}
.game-preview > * { position: relative; z-index: 1; }
.game-card-body { padding: 15px 18px 18px; }
.game-card h3 { margin: 0 0 5px; font: normal 19px/1.2 var(--serif); display: flex; align-items: baseline; gap: 9px; }
.game-num { font: 700 10px/1 var(--sans); letter-spacing: 1px; color: var(--gold); }
.game-card p { margin: 0; color: var(--muted); font-size: 12px; }
.game-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 4px 7px; border-radius: var(--radius);
  font-size: 9px; font-weight: 700; letter-spacing: 1.2px;
  background: rgba(8, 9, 12, .78); border: 1px solid rgba(200, 164, 92, .3);
  color: var(--gold-l);
}
.play-hint {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 13px;
  color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
}

/* превью рулетки */
.mini-wheel {
  width: 96px; height: 96px; border-radius: 50%;
  background: repeating-conic-gradient(#8d2231 0 9.72deg, #15181e 9.72deg 19.44deg);
  border: 5px solid #c8a45c;
  box-shadow: 0 0 0 3px #241c10, 0 12px 26px rgba(0, 0, 0, .55), inset 0 0 0 9px rgba(0, 0, 0, .25);
  animation: spin-slow 14s linear infinite;
  position: relative;
}
.mini-wheel::after { content: "●"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold-l); font-size: 18px; }

.mini-dice { font-size: 76px; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .6)); animation: dice-bob 2.8s ease-in-out infinite; }

.mini-reels { display: flex; gap: 7px; }
.mini-reel {
  width: 44px; height: 70px; border-radius: 3px;
  background: linear-gradient(180deg, #f2ede0, #c6c0b2);
  color: #20232a; display: grid; place-items: center; font-size: 28px;
  box-shadow: inset 0 6px 12px rgba(0, 0, 0, .18), 0 8px 16px rgba(0, 0, 0, .4);
  animation: reel-jitter .9s steps(3) infinite;
}
.mini-reel:nth-child(2) { animation-delay: .15s; }
.mini-reel:nth-child(3) { animation-delay: .3s; }
.mini-reel.red { color: #d74d5b; }
.mini-reel.gold { color: #c89525; }
.mini-reel.ruby { color: #b3223c; }

.mini-board {
  width: 104px; height: 104px; border-radius: 50%;
  background: radial-gradient(circle, #d3b476 0 9%, #8d2231 9% 19%, #14171c 19% 31%, #8d2231 31% 42%, #14171c 42% 55%, #8d2231 55% 67%, #14171c 67% 80%, #8d2231 80% 100%);
  border: 5px solid #c8a45c; box-shadow: 0 10px 24px rgba(0, 0, 0, .5);
  position: relative;
}
.mini-board::after { content: "➤"; position: absolute; top: -8px; left: 44px; color: var(--gold-l); font-size: 19px; transform: rotate(45deg); }

.mini-cards { position: relative; width: 140px; height: 100px; }
.mini-card {
  position: absolute; width: 62px; height: 90px; border-radius: 3px;
  background: linear-gradient(145deg, #fff, #d8d4ca); color: #17191e;
  display: grid; place-items: center; font: 900 28px/1 var(--serif);
  box-shadow: 0 10px 20px rgba(0, 0, 0, .45); border: 1px solid #fff;
}
.mini-card.one { left: 8px; top: 8px; transform: rotate(-12deg); animation: card-float 3s ease-in-out infinite; }
.mini-card.two { right: 8px; top: 0; transform: rotate(11deg); animation: card-float 3s ease-in-out .5s infinite; color: var(--wine); }

/* ---------- профиль ---------- */
.profile-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 16px; }
@media (max-width: 820px) { .profile-grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 22px; box-shadow: 0 14px 38px rgba(0, 0, 0, .22);
}
.panel-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.panel-title h3 { margin: 0; font: normal 18px/1.2 var(--serif); }

.profile-hero { display: flex; align-items: center; gap: 16px; }
.profile-hero .avatar { width: 64px; height: 64px; font-size: 32px; border-radius: var(--radius); border: 1px solid var(--gold); }
.profile-hero h2 { margin: 0 0 4px; font: normal 24px/1.2 var(--serif); }
.profile-hero .muted { font-size: 12px; }

.big-balance {
  margin: 20px 0 4px; padding: 18px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #0d0f13;
}
.big-balance small { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: 1.6px; font-size: 9px; font-weight: 700; }
.big-balance strong { font: normal 36px/1.2 var(--serif); color: var(--gold-l); font-variant-numeric: tabular-nums; }

.cash-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 15px; }
.cash-actions .btn { width: 100%; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.stat-box { background: #0f1116; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 13px; }
.stat-box small { color: var(--muted); display: block; font-size: 9px; text-transform: uppercase; letter-spacing: 1.2px; }
.stat-box b { font: normal 21px/1.2 var(--serif); display: block; margin-top: 6px; font-variant-numeric: tabular-nums; }

.requisites {
  margin-top: 17px; padding: 13px; border-radius: var(--radius);
  background: rgba(200, 164, 92, .05); border: 1px solid var(--line);
  font-size: 12px; color: #c8c2b3; white-space: pre-wrap; line-height: 1.6;
}

.tx-list { display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; padding-right: 4px; }
.tx-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px; border-radius: var(--radius);
  background: #0f1116; border: 1px solid var(--line-soft);
}
.tx-icon {
  width: 34px; height: 34px; border-radius: var(--radius);
  display: grid; place-items: center; font-size: 15px;
  background: rgba(200, 164, 92, .1); color: var(--gold-l);
  border: 1px solid var(--line);
}
.tx-icon.out { background: rgba(184, 82, 97, .1); color: #d79aa3; }
.tx-main { flex: 1; min-width: 0; }
.tx-main b { display: block; font-size: 13px; }
.tx-main small { color: var(--muted); font-size: 11px; }
.tx-amount { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; }
.tx-amount.plus { color: #9ecdb2; }
.tx-amount.minus { color: #d79aa3; }
.tx-shot { width: 34px; height: 34px; border-radius: var(--radius); object-fit: cover; border: 1px solid var(--line-soft); cursor: zoom-in; }

.empty { text-align: center; color: var(--muted); padding: 32px 10px; font-size: 12px; }
.empty span { display: block; font-size: 26px; margin-bottom: 8px; opacity: .5; }

/* ---------- нижняя навигация ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: center;
  padding: 0 12px env(safe-area-inset-bottom, 0);
  background: rgba(11, 12, 15, .98);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.nav-btn {
  min-width: 104px; padding: 9px 14px 11px;
  border: 0; border-top: 2px solid transparent;
  background: transparent; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
  transition: color .18s, border-color .18s, background .18s;
}
.nav-btn svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.nav-btn:hover { color: var(--text); }
.nav-btn.active { color: var(--gold-l); border-top-color: var(--gold); background: rgba(200, 164, 92, .04); }
.nav-btn.admin-tab.active { color: #d79aa3; border-top-color: var(--wine-l); background: rgba(184, 82, 97, .05); }

/* ---------- модальные окна ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(5, 6, 8, .9); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 16px;
  animation: fade .2s both; overflow-y: auto;
}
.modal {
  width: min(560px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: modal-in .25s both;
  overflow: hidden; margin: auto;
}
.modal.wide { width: min(900px, 100%); }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--line-soft);
  background: var(--panel-2);
}
.modal-head h3 { margin: 0; font: normal 19px/1.2 var(--serif); }
.modal-body { padding: 22px; }
.modal-close {
  width: 32px; height: 32px; border-radius: var(--radius);
  border: 1px solid var(--line-soft); background: #0f1116;
  color: var(--muted); font-size: 18px; line-height: 1;
}
.modal-close:hover { color: #fff; border-color: var(--wine-l); }

.form-stack { display: flex; flex-direction: column; gap: 15px; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.6; }
.upload-zone {
  border: 1px dashed rgba(200, 164, 92, .4); border-radius: var(--radius);
  padding: 18px; text-align: center; cursor: pointer;
  background: rgba(200, 164, 92, .03); transition: .2s;
}
.upload-zone:hover { background: rgba(200, 164, 92, .07); }
.upload-zone input { display: none; }
.upload-zone img { max-height: 160px; max-width: 100%; border-radius: var(--radius); margin-top: 10px; display: none; }
.upload-zone.has-image img { display: block; }
.upload-zone .upload-label { font-size: 12px; font-weight: 700; color: var(--gold-l); }

/* ---------- игровые модалки ---------- */
.game-modal .modal-head { background: #0c0e12; }
.game-balance { font-size: 12px; color: var(--muted); }
.game-balance b { color: var(--gold-l); font: normal 15px/1 var(--serif); }

.game-stage {
  position: relative; min-height: 310px;
  display: grid; place-items: center;
  padding: 26px 18px;
  background: radial-gradient(500px 260px at 50% 20%, rgba(200, 164, 92, .06), transparent 70%), #0d0f13;
  overflow: hidden;
}
.game-stage::before {
  content: ""; position: absolute; inset: 0;
  background: url("../assets/photo-felt.jpg") center / cover no-repeat;
  opacity: .1; pointer-events: none;
}
.game-stage > * { position: relative; z-index: 1; }

.game-controls { padding: 18px 22px 4px; }
.control-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--muted); font-weight: 700; margin-bottom: 9px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.choice {
  border: 1px solid var(--line-soft); background: #0f1116; color: var(--text);
  padding: 9px 13px; border-radius: var(--radius); font-size: 12px; transition: .16s;
}
.choice:hover { border-color: rgba(200, 164, 92, .5); }
.choice.selected { background: rgba(200, 164, 92, .12); border-color: var(--gold); color: var(--gold-l); }
.choice.red.selected { background: rgba(123, 28, 43, .35); border-color: var(--wine-l); color: #e7b6bd; }
.choice.black.selected { background: rgba(255, 255, 255, .09); border-color: #aeb4bf; color: #fff; }

.number-grid { display: grid; grid-template-columns: repeat(13, 1fr); gap: 4px; margin-bottom: 16px; max-height: 116px; overflow-y: auto; padding: 3px; }
.num-cell { aspect-ratio: 1; border: 1px solid var(--line-soft); border-radius: 2px; background: #15181e; color: #dfe3ec; font-size: 11px; font-weight: 700; }
.num-cell.red { background: rgba(141, 34, 49, .6); }
.num-cell.green { background: rgba(20, 92, 66, .7); }
.num-cell.selected { outline: 2px solid var(--gold); color: #fff; }

.bet-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 16px 22px 20px; border-top: 1px solid var(--line-soft);
}
.bet-input-wrap { position: relative; flex: 1; min-width: 130px; }
.bet-input-wrap .input { padding-right: 38px; }
.bet-input-wrap span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--gold); font-weight: 700; }
.quick-bets { display: flex; gap: 6px; }
.quick-bets .choice { padding: 9px 10px; }
.play-btn { min-width: 130px; }

.result-line {
  margin: 0 22px 18px; padding: 11px 14px; border-radius: var(--radius);
  background: #0d0f13; border: 1px solid var(--line-soft);
  font-size: 13px; text-align: center; min-height: 44px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.result-line.win { background: rgba(106, 165, 131, .1); border-color: rgba(106, 165, 131, .4); color: #a9d6ba; }
.result-line.lose { background: rgba(184, 82, 97, .09); border-color: rgba(184, 82, 97, .35); color: #dfa7af; }
.result-line.push { background: rgba(200, 164, 92, .08); border-color: var(--line); color: var(--gold-l); }

/* рулетка в игре */
.big-wheel-wrap { position: relative; width: 300px; height: 300px; display: grid; place-items: center; }
.big-wheel {
  width: 278px; height: 278px; border-radius: 50%;
  border: 9px solid #c8a45c;
  box-shadow: 0 0 0 4px #241c10, 0 20px 44px rgba(0, 0, 0, .65), inset 0 0 0 11px rgba(0, 0, 0, .22);
  position: relative;
  transition: transform 4.3s cubic-bezier(.12, .72, .12, 1);
}
.big-wheel .num {
  position: absolute; left: 50%; top: 50%; font-size: 9px; font-weight: 700;
  color: #fff; text-shadow: 0 1px 2px #000; transform-origin: 0 0;
}
.wheel-pointer {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent;
  border-top: 24px solid var(--gold-l); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .6)); z-index: 3;
}
.landed-display {
  position: absolute; right: 8px; bottom: 8px; z-index: 5;
  width: 56px; height: 56px; border-radius: var(--radius);
  display: grid; place-items: center; font: 900 24px/1 var(--serif);
  background: #15181e; border: 1px solid var(--line); color: var(--gold-l);
}
.landed-display.red { color: #e79aa5; border-color: var(--wine-l); }
.landed-display.black { color: #e9edf7; border-color: #aab2c4; }
.landed-display.green { color: #9ecdb2; border-color: var(--green); }

/* кубик */
.die {
  width: 150px; height: 150px; border-radius: 20px;
  background: linear-gradient(145deg, #f7f4ec, #d6d3ca);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .55), inset 0 -7px 0 rgba(0, 0, 0, .08), inset 0 3px 0 #fff;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  padding: 20px; gap: 6px; position: relative;
}
.die.rolling { animation: die-shake .13s linear infinite; }
.pip { width: 17px; height: 17px; border-radius: 50%; background: #191c24; align-self: center; justify-self: center; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .6); }
.die.win { box-shadow: 0 20px 46px rgba(200, 164, 92, .4), inset 0 -7px 0 rgba(0, 0, 0, .08); }

/* слоты */
.slot-machine {
  padding: 16px; border-radius: var(--radius);
  background: linear-gradient(160deg, #24171c, #141016);
  border: 1px solid var(--gold);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .6), inset 0 0 30px rgba(200, 164, 92, .06);
}
.slot-reels { display: flex; gap: 9px; }
.slot-reel {
  width: 92px; height: 120px; border-radius: 3px; overflow: hidden;
  background: linear-gradient(180deg, #f6f1e5, #c8c3b6);
  box-shadow: inset 0 8px 14px rgba(0, 0, 0, .18), inset 0 -8px 14px rgba(0, 0, 0, .18);
  position: relative;
}
.slot-strip { display: flex; flex-direction: column; will-change: transform; }
.slot-symbol { height: 120px; display: grid; place-items: center; font-size: 50px; flex: none; font-weight: 900; }
.slot-symbol.red { color: #e8616d; text-shadow: 0 3px 0 #711b25, 0 0 20px rgba(232, 97, 109, .45); }
.slot-symbol.gold { color: #e3b13c; text-shadow: 0 3px 0 #6f5110, 0 0 20px rgba(227, 177, 60, .45); }
.slot-symbol.ruby { color: #c42045; text-shadow: 0 3px 0 #5d0f24, 0 0 20px rgba(196, 32, 69, .4); }
.slot-symbol.green { color: #258a55; text-shadow: 0 3px 0 #0d3b24, 0 0 20px rgba(37, 138, 85, .4); }
.slot-symbol.blue { color: #2b6ec4; text-shadow: 0 3px 0 #12345f, 0 0 20px rgba(43, 110, 196, .4); }
.slot-symbol.silver { color: #4c5361; font-size: 25px; letter-spacing: 2px; text-shadow: 0 2px 0 #d9dee8; }
.slot-symbol.purple { color: #8b59c4; text-shadow: 0 3px 0 #3d225e, 0 0 20px rgba(139, 89, 196, .4); }
.slot-machine.win { animation: slot-glow .8s ease-in-out 3; }

/* дартс */
.dart-board {
  width: 280px; height: 280px; border-radius: 50%; position: relative;
  background:
    radial-gradient(circle at 50% 50%, #d3b476 0 5%, #8d2231 5% 9%, #14171c 9% 15%, #8d2231 15% 20%, #14171c 20% 28%, #8d2231 28% 34%, #14171c 34% 44%, #8d2231 44% 50%, #14171c 50% 62%, #8d2231 62% 69%, #14171c 69% 82%, #8d2231 82% 90%, #1b1e24 90% 100%);
  border: 7px solid #c8a45c;
  box-shadow: 0 20px 44px rgba(0, 0, 0, .6);
}
.dart {
  position: absolute; left: 50%; top: 50%;
  width: 5px; height: 30px; border-radius: 3px;
  background: linear-gradient(180deg, #fff, #c9ced9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .7);
  transform-origin: 50% 0; opacity: 0;
}
.dart::after { content: ""; position: absolute; bottom: -9px; left: .5px; width: 4px; height: 11px; background: var(--wine-l); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.dart-score { position: absolute; font-size: 11px; font-weight: 700; color: var(--gold-l); text-shadow: 0 2px 5px #000; opacity: 0; transform: translate(-50%, -50%); }

/* блэкджек */
.table-felt {
  width: 100%; min-height: 300px; border-radius: var(--radius);
  background: radial-gradient(ellipse at center, #164434, #0a211a 78%);
  border: 5px solid #3b2a1c;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .55), inset 0 0 60px rgba(0, 0, 0, .4);
  padding: 18px 22px; position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hand-row { display: flex; align-items: center; gap: 10px; min-height: 104px; }
.hand-label { width: 62px; color: #d7f3e6; font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px; font-weight: 700; }
.hand-cards { display: flex; gap: 8px; min-height: 94px; align-items: center; }
.card {
  width: 62px; height: 90px; border-radius: 3px; flex: none;
  background: linear-gradient(145deg, #fff, #dedbd2); color: #161920;
  box-shadow: 0 8px 16px rgba(0, 0, 0, .45);
  display: flex; flex-direction: column; justify-content: space-between; padding: 7px;
  font-weight: 900; font-size: 16px;
  animation: deal-card .38s cubic-bezier(.2, .9, .3, 1.3) both;
  transform-style: preserve-3d;
}
.card .suit { align-self: flex-end; font-size: 20px; }
.card.red { color: #a82736; }
.card.back {
  background: repeating-linear-gradient(45deg, #1b2547 0 6px, #2b3a6b 6px 12px);
  border: 2px solid #d8c9a5; color: transparent;
}
.hand-value { color: var(--gold-l); font-weight: 700; font: 18px/1 var(--serif); margin-left: 4px; }
.table-rule { position: absolute; bottom: 7px; left: 0; right: 0; text-align: center; font-size: 9px; letter-spacing: 2px; color: rgba(255, 255, 255, .38); }

.bj-hands { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.bj-hand {
  display: flex; align-items: center; gap: 10px;
  min-height: 104px; padding: 5px 10px;
  border: 1px solid transparent; border-radius: var(--radius);
}
.bj-hand.active { border-color: rgba(200, 164, 92, .45); background: rgba(200, 164, 92, .06); }
.bj-hand.win { border-color: rgba(106, 165, 131, .55); background: rgba(106, 165, 131, .07); }
.bj-hand.lose { border-color: rgba(184, 82, 97, .45); }
.bj-hand.push { border-color: rgba(200, 164, 92, .4); }
.bj-hand .hand-label { width: 62px; }

.bj-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.bj-act { flex: 1 1 auto; }

/* ---------- админка ---------- */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 9px; margin-bottom: 18px; }
.admin-stat { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 12px; }
.admin-stat small { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: 1.1px; }
.admin-stat b { display: block; font: normal 21px/1.2 var(--serif); margin-top: 5px; font-variant-numeric: tabular-nums; }
.admin-stat.alert b { color: var(--gold-l); }

.tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line-soft); margin-bottom: 20px; overflow-x: auto; }
.tab {
  border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted);
  padding: 11px 15px; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; white-space: nowrap;
}
.tab.active { color: var(--gold-l); border-bottom-color: var(--gold); }

.tx-admin {
  display: flex; gap: 11px; align-items: flex-start; flex-wrap: wrap;
  padding: 13px; border-radius: var(--radius); background: #0f1116;
  border: 1px solid var(--line-soft); margin-bottom: 8px;
}
.tx-admin .tx-main { flex: 1 1 200px; }
.tx-admin .tx-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tx-shot-lg { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line-soft); cursor: zoom-in; }

.user-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.user-table th { text-align: left; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: 1.2px; padding: 10px 8px; border-bottom: 1px solid var(--line-soft); }
.user-table td { padding: 10px 8px; border-bottom: 1px solid rgba(255, 255, 255, .045); vertical-align: middle; }
.user-table tr:hover td { background: rgba(255, 255, 255, .015); }
.user-cell { display: flex; align-items: center; gap: 9px; }
.user-cell .avatar { width: 28px; height: 28px; font-size: 15px; }
.table-scroll { overflow-x: auto; }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 11px; }
.settings-card { padding: 14px; border-radius: var(--radius); background: #0f1116; border: 1px solid var(--line-soft); }
.settings-card h4 { margin: 0 0 12px; font: normal 15px/1.2 var(--serif); display: flex; align-items: center; justify-content: space-between; }
.settings-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.settings-fields .field:first-child { grid-column: 1 / -1; }
.settings-fields .input { padding: 8px 10px; font-size: 12px; }
.settings-fields label { font-size: 8.5px; }

.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #3a3d44; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; left: 3px; top: 3px; transition: .2s; }
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::before { transform: translateX(18px); }

/* ---------- тосты, конфетти ---------- */
#toastRoot { position: fixed; top: 78px; right: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast {
  min-width: 230px; max-width: 350px;
  padding: 12px 15px; border-radius: var(--radius);
  background: #14161b; border: 1px solid var(--line-soft); border-left: 2px solid var(--gold);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5);
  font-size: 12px; font-weight: 700; letter-spacing: .2px;
  animation: toast-in .25s both;
}
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 7px; height: 13px; opacity: .85; animation: confetti-fall linear forwards; }

/* ---------- анимации ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes slow-pulse { 0%, 100% { border-color: rgba(200, 164, 92, .5); } 50% { border-color: var(--gold); } }
@keyframes dice-bob { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-10px) rotate(6deg); } }
@keyframes reel-jitter { 0% { transform: translateY(-7px); } 50% { transform: translateY(7px); } 100% { transform: translateY(-7px); } }
@keyframes card-float { 0%, 100% { transform: translateY(0) rotate(-12deg); } 50% { transform: translateY(-8px) rotate(-8deg); } }
@keyframes die-shake { 0% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-5px, 3px) rotate(-9deg); } 50% { transform: translate(4px, -4px) rotate(8deg); } 75% { transform: translate(-3px, -2px) rotate(-5deg); } }
@keyframes deal-card { from { opacity: 0; transform: translateY(-60px) rotate(-16deg) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes slot-glow { 0%, 100% { box-shadow: 0 20px 44px rgba(0, 0, 0, .6), inset 0 0 30px rgba(200, 164, 92, .06); } 50% { box-shadow: 0 20px 60px rgba(200, 164, 92, .4), inset 0 0 40px rgba(200, 164, 92, .2); } }
@keyframes confetti-fall { to { transform: translateY(105vh) rotate(720deg); opacity: .2; } }
@keyframes win-pop { 0% { transform: scale(.7); opacity: 0; } 60% { transform: scale(1.07); } 100% { transform: scale(1); opacity: 1; } }
.win-pop { animation: win-pop .4s both; }

/* ---------- адаптив ---------- */
@media (max-width: 860px) {
  .auth-screen { grid-template-columns: 1fr; max-width: 480px; padding: 26px 16px; }
  .auth-card { border-right: 1px solid var(--line); }
  .auth-visual { display: none; }
}

@media (max-width: 640px) {
  :root { --nav-h: 62px; }
  .topbar { padding: 9px 12px; }
  .topbar .brand-name { font-size: 16px; }
  .balance-pill { padding-right: 10px; }
  .balance-pill b { font-size: 15px; }
  .user-chip span:last-child { display: none; }
  .user-chip { padding: 5px; }
  main { padding: 18px 12px; }
  .hero { min-height: 250px; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
  .game-preview { height: 132px; }
  .game-card { min-height: 238px; }
  .nav-btn { min-width: 74px; padding: 8px 8px 10px; font-size: 8px; letter-spacing: 1px; }
  .big-wheel-wrap { transform: scale(.85); }
  .slot-reel { width: 72px; height: 100px; }
  .slot-symbol { height: 100px; font-size: 40px; }
  .die { width: 120px; height: 120px; }
  .dart-board { width: 230px; height: 230px; }
  .card { width: 54px; height: 78px; font-size: 14px; }
  .modal-body { padding: 16px; }
  .bet-bar { padding: 14px 16px 18px; }
  .number-grid { grid-template-columns: repeat(10, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
