/* layout.css — app shell: topbar, sidebar, content grid, mobile bottom nav. */

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--topbar-height) 1fr;
  /* плавное сворачивание/разворачивание сайдбара (ease-in-out) */
  transition: grid-template-columns 280ms cubic-bezier(0.4, 0, 0.2, 1);
  /* full-width topbar on top; sidebar sits below it (standard casino layout) */
  grid-template-areas:
    "topbar topbar"
    "sidebar main";
}
.app.is-sidebar-collapsed {
  grid-template-columns: var(--sidebar-width-collapsed) 1fr;
}

/* ============================================================ Top bar */
.topbar {
  grid-area: topbar;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: var(--topbar-height);
  padding-inline: var(--space-4);
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
}
.topbar__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-text-primary);
  flex-shrink: 0;
}
.topbar__brand .logo-dot { color: var(--color-accent); }
.brand-mark { display: inline-flex; flex-shrink: 0; }
.brand-mark__svg { display: block; filter: drop-shadow(0 2px 6px rgba(0, 178, 75, 0.30)); }
.brand-text { letter-spacing: 0.01em; }

/* horizontal top navigation */
.topnav { display: flex; align-items: center; gap: 2px; margin-left: var(--space-2); }
.topnav__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
}
.topnav__item:hover { background: var(--color-bg-tertiary); color: var(--color-text-primary); }
.topnav__item.is-active { color: var(--color-accent); background: #1D373B; }
.topnav__icon { display: inline-flex; }
.topnav__icon svg { width: auto; height: 18px; }
/* VIP — иконка зелёная по умолчанию (по макету) */
.topnav__item--vip .topnav__icon { color: #18E77C; }
@media (max-width: 1180px) { .topnav span:not(.topnav__icon) { display: none; } .topnav__item { padding: var(--space-2); } }
@media (max-width: 920px) { .topnav { display: none; } }

.topbar__search {
  flex: 1;
  max-width: 280px;
}
.topbar__spacer { flex: 1; }

.topbar__right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* balance + currency switch */
.balance-box {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-3);
}
.balance-box__coin { display: inline-flex; flex-shrink: 0; color: var(--color-accent); }
.balance-box__col { display: flex; flex-direction: column; line-height: 1.15; }
.balance-box__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--color-text-tertiary);
}
.balance-box__amount {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
}
/* live USD equivalent of the balance (from /api/rates) */
.balance-box__usd {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  line-height: 1.1;
  color: var(--color-text-tertiary);
}
.balance-box__usd:empty { display: none; }
@media (max-width: 768px) { .balance-box__usd { display: none; } }
.balance-box__currency {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  align-self: stretch;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-secondary);
  padding-left: var(--space-2);
  margin-left: var(--space-1);
  border-left: 1px solid var(--color-border);
}
.balance-box__currency:hover { color: var(--color-text-primary); }
@media (max-width: 768px) { .balance-box__label { display: none; } }

/* avatar */
.avatar {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-accent);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 24px; height: 24px; font-size: var(--text-xs); }

/* notifications — bell uses the shared icon button (.btn.btn--icon.btn--secondary);
   this only adds the relative context for the unread dot + a circular shape */
.notif__btn { position: relative; color: var(--color-text-secondary); }
.notif__dot {
  position: absolute;
  top: 6px; right: 7px;
  width: 9px; height: 9px;
  border-radius: var(--radius-full);
  background: var(--color-danger);
  border: 2px solid var(--color-bg-secondary);
}
.notif__menu { width: 320px; min-width: 320px; padding: var(--space-2); }
.notif__head {
  font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--color-text-tertiary); padding: var(--space-2) var(--space-2) var(--space-1);
}
.notif__item { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-2); border-radius: var(--radius-sm); }
.notif__item:hover { background: var(--color-bg-tertiary); }
/* unread notifications get a subtle accent tint + left bar */
.notif__item.is-unread { background: rgba(24, 231, 124, 0.06); box-shadow: inset 2px 0 0 var(--color-accent); }
.notif__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--color-accent-glow); color: var(--color-accent);
}
.notif__text { flex: 1; min-width: 0; }
.notif__title { font-size: var(--text-sm); font-weight: 600; color: var(--color-text-primary); }
.notif__body { font-size: var(--text-xs); color: var(--color-text-secondary); }
.notif__time { font-size: var(--text-xs); color: var(--color-text-tertiary); flex-shrink: 0; }
.notif__all {
  display: block; text-align: center; padding: var(--space-2); margin-top: var(--space-1);
  font-size: var(--text-sm); font-weight: 600; color: var(--color-accent);
  border-top: 1px solid var(--color-border);
}
@media (max-width: 768px) { .notif { display: none; } }

/* ============================================================ Sidebar */
.sidebar {
  grid-area: sidebar;
  position: sticky;
  top: var(--topbar-height);
  align-self: start;
  height: calc(100vh - var(--topbar-height));
  display: flex;
  flex-direction: column;
  background: var(--color-bg-secondary);
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  padding: var(--space-3);
  /* keep tooltips/flyouts above main content (game cards create stacking contexts) */
  z-index: 90;
}
.sidebar__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background var(--transition-base), color var(--transition-base);
}
/* hover — единая подсветка фоном #27273F, иконка/текст светлеют */
.nav-item:hover { background: #27273F; color: var(--color-text-primary); }
.nav-item:hover .nav-item__icon { color: #fff; }
.nav-item.is-active {
  background: #27273F;
  color: #fff;
  font-weight: 600;
}
/* активный раздел — вертикальная зелёная линия 2px со скруглёнными концами слева от иконки */
.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 22px;
  border-radius: 2px;
  background: #18E77C;
}
.nav-item.is-active .nav-item__icon { color: #fff; }
/* все иконки сайдбара — единый цвет #A0A0B8; высота фикс., ширина авто (пропорции макета) */
/* fixed-width icon column so every label starts at the same x (icons have different
   intrinsic aspect ratios; without a fixed column the labels jitter ~9px) */
.nav-item__icon { display: flex; flex-shrink: 0; justify-content: center; width: 26px; color: #A0A0B8; }
.nav-item__icon svg { width: auto; height: 21px; max-width: 100%; }
/* labels wrap instead of clipping, so long items (e.g. "Responsible Gambling") stay readable.
   text-align:left normalises the footer items, which are <button>s (default centred) vs the
   <a> nav links — without it "Language"/"Support" render centred and misaligned. */
.nav-item__label { flex: 1; min-width: 0; text-align: left; white-space: normal; line-height: 1.25; overflow: visible; }
.nav-item__chevron { display: flex; flex-shrink: 0; transition: transform var(--transition-fast); }

/* The Originals group toggle is a <button> inside a plain <div.nav-group>, so unlike the
   <a> nav items (which stretch in the flex column) it shrinks to its content width — making
   its active/hover highlight stop short of the row. Force it full-width so the highlight
   matches every other item. */
.nav-group > .nav-item { width: 100%; }

/* collapsible group (Originals) */
.nav-group__sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: var(--space-6);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}
.nav-group.is-open .nav-group__sub { max-height: 320px; }
.nav-group.is-open .nav-item__chevron { transform: rotate(90deg); }
.nav-subitem {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
}
.nav-subitem:hover { color: var(--color-text-primary); background: var(--color-bg-tertiary); }

.sidebar__footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  margin-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

/* «EN» в рамке со скруглёнными углами (по макету Language_EN) */
.lang-badge {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1px 8px;
}
.app.is-sidebar-collapsed .lang-badge { display: none; }

/* ---- collapsed (compact) sidebar: icons only, labels become hover tooltips ---- */
.app.is-sidebar-collapsed { grid-template-columns: var(--sidebar-width-collapsed) 1fr; }
.app.is-sidebar-collapsed .sidebar { overflow: visible; }
.app.is-sidebar-collapsed .nav-item { justify-content: center; position: relative; }
.app.is-sidebar-collapsed .nav-item__chevron { display: none; }

/* the label floats out as a tooltip on hover */
.app.is-sidebar-collapsed .nav-item__label {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  flex: none;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  font-size: var(--text-xs);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  z-index: 999;
}
.app.is-sidebar-collapsed .nav-item:hover .nav-item__label { opacity: 1; transform: translateY(-50%) translateX(0); }
/* the Originals group uses a flyout (below) instead of a label tooltip */
.app.is-sidebar-collapsed .nav-group > [data-nav-group] .nav-item__label { display: none; }

/* Originals sub-list becomes a flyout panel on hover */
.app.is-sidebar-collapsed .nav-group { position: relative; }
.app.is-sidebar-collapsed .nav-group__sub {
  position: absolute;
  left: calc(100% + 10px);
  top: 0;
  margin-left: 0;
  max-height: none;
  overflow: visible;
  min-width: 170px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  z-index: 999;
}
.app.is-sidebar-collapsed .nav-group:hover .nav-group__sub { opacity: 1; pointer-events: auto; transform: translateX(0); }

/* ============================================================ Main content */
.main {
  grid-area: main;
  min-width: 0;
  padding: var(--space-5);
}

/* ============================================================ Hero carousel */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hero__track {
  display: flex;
  transition: transform var(--transition-slow);
}
.hero__slide {
  flex: 0 0 100%;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-8);
  /* левый отступ = 40px (отступ стрелки) + 40px (ширина стрелки) + 44px (зазор до контента) */
  padding-left: 124px;
  color: #fff;
}
.hero__slide h2 { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 700; max-width: 60%; }
.hero__slide p { color: rgba(255,255,255,0.85); max-width: 50%; }
/* CTA баннера (напр. «Claim Now») — pill, как в макете big_buttons */
.hero__slide .btn { align-self: flex-start; margin-top: var(--space-2); border-radius: var(--radius-full); }
.hero__dots {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-2);
}
.hero__dot {
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.4);
  transition: width var(--transition-fast), background var(--transition-fast);
}
.hero__dot.is-active { width: 24px; background: #fff; }
.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(0,0,0,0.35);
  color: #fff;
}
.hero__arrow:hover { background: rgba(0,0,0,0.6); }
.hero__arrow--prev { left: 40px; }
.hero__arrow--next { right: 40px; }

/* ============================================================ Recent big wins (cards) */
.wins {
  margin-top: var(--space-4);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: stretch;
}
.wins__label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  padding: 0 var(--space-4);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-accent);
  border-right: 1px solid var(--color-border);
  background: var(--color-bg-tertiary);
}
.wins__label .pulse {
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--color-accent-glow); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px transparent; }
}
.wins__viewport { overflow: hidden; flex: 1; position: relative; padding: var(--space-3) 0; }
/* soft fade at both edges so cards melt in/out */
.wins__viewport::before,
.wins__viewport::after {
  content: "";
  position: absolute; top: 0; bottom: 0;
  width: 48px; z-index: 2; pointer-events: none;
}
.wins__viewport::before { left: 0; background: linear-gradient(90deg, var(--color-bg-secondary), transparent); }
.wins__viewport::after { right: 0; background: linear-gradient(270deg, var(--color-bg-secondary), transparent); }
.wins__track {
  display: flex;
  gap: var(--space-3);
  width: max-content;
  padding-inline: var(--space-3);
  animation: wins-scroll 45s linear infinite;
  will-change: transform;
}
.wins:hover .wins__track { animation-play-state: paused; }
@keyframes wins-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.wincard {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 0 0 auto;
  /* ширина подстраивается под содержимое: строка «+сумма ТИКЕР [иконка]»
     никогда не переносится; карточка расширяется по необходимости */
  width: max-content;
  min-width: 190px;
  max-width: 340px;
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.wincard__thumb {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700; font-size: var(--text-lg);
  color: #fff;
  overflow: hidden;
}
.wincard__img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1 / 1; border-radius: var(--radius-sm); display: block; }
.wincard__info { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.wincard__amount {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;            /* сумма + тикер + иконка — строго одной строкой */
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: var(--text-sm);
  color: var(--color-accent);
}
/* крипто-иконка рядом с суммой (BTC/ETH/USDT) */
.wincard__coin { display: inline-flex; flex-shrink: 0; transform: translateY(-2px); }
.wincard__coin svg { width: 16px; height: 16px; display: block; }
/* game/user могут усекаться, но сумма с иконкой — нет */
.wincard__game, .wincard__user { max-width: 200px; }
.wincard__game {
  font-size: var(--text-xs); font-weight: 600; color: var(--color-text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wincard__user {
  font-size: var(--text-xs); color: var(--color-text-tertiary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ============================================================ Lobby sections */
.lobby__sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-top: var(--space-6);
}

/* ============================================================ Footer */
.footer {
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}
.footer__age {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border: 2px solid var(--color-text-tertiary);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--text-xs);
}

/* ============================================================ Auth pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  position: relative;
  overflow: hidden;
}
.auth-page__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(0,178,75,0.18), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(48,94,235,0.16), transparent 45%),
    var(--color-bg-primary);
  filter: blur(0px);
  z-index: 0;
}
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
}
.auth-card__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}
.auth-card__brand .logo-dot { color: var(--color-accent); }
.auth-card__subtitle {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-5);
}
.auth-form { display: flex; flex-direction: column; gap: var(--space-4); }
.auth-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-tertiary);
  font-size: var(--text-xs);
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}
.auth-sso { display: flex; flex-direction: column; gap: var(--space-2); }
.auth-foot {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-4);
}
.auth-foot a { color: var(--color-accent); font-weight: 600; }

/* password strength meter */
.strength { display: flex; gap: var(--space-1); margin-top: var(--space-1); }
.strength__seg {
  flex: 1;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-bg-tertiary);
  transition: background var(--transition-fast);
}
.strength[data-level="1"] .strength__seg:nth-child(-n+1) { background: var(--color-danger); }
.strength[data-level="2"] .strength__seg:nth-child(-n+2) { background: var(--color-warning); }
.strength[data-level="3"] .strength__seg:nth-child(-n+3) { background: var(--color-info); }
.strength[data-level="4"] .strength__seg { background: var(--color-success); }

/* ============================================================ Generic page bits */
.page-head { margin-bottom: var(--space-5); }
.page-head h1 { font-size: var(--text-2xl); }
.page-head p { margin-top: var(--space-1); }

.stack { display: flex; flex-direction: column; gap: var(--space-5); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

.filters { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: flex-end; margin-bottom: var(--space-4); }
.filters .field { min-width: 160px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

/* ============================================================ Game page */
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-4);
  align-items: start;
}
.game-layout.is-chat-hidden { grid-template-columns: 1fr; }
.game-layout.is-chat-hidden .game-chat { display: none; }
.game-chat {
  height: clamp(420px, 70vh, 720px);
  position: sticky;
  top: calc(var(--topbar-height) + var(--space-4));
}

/* ============================================================ Wallet: deposit two columns + steps */
.deposit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}
.step { margin-bottom: var(--space-5); }
.step:last-child { margin-bottom: 0; }
.step__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
}
.deposit-panel {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: sticky;
  top: calc(var(--topbar-height) + var(--space-4));
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.deposit-panel__head { display: flex; align-items: center; justify-content: space-between; }
.deposit-panel__head h3 { font-size: var(--text-lg); }

/* ============================================================ Profile header */
.profile-header { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.avatar--lg { width: 72px; height: 72px; font-size: var(--text-2xl); }
.profile-header__meta { display: flex; flex-direction: column; gap: 2px; }
.profile-header__name { font-size: var(--text-xl); font-weight: 700; }

@media (max-width: 1024px) {
  .game-layout { grid-template-columns: 1fr; }
  .game-chat { display: none; }
  .deposit-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .method-row { flex-direction: column; }
}

/* ============================================================ Originals layout */
.originals-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 320px;
  grid-template-areas: "bet game chat";
  gap: var(--space-4);
  align-items: start;
}
.originals-layout.is-chat-hidden {
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-areas: "bet game";
}
.originals-bet { grid-area: bet; display: flex; flex-direction: column; gap: var(--space-3); }
.originals-game { grid-area: game; min-width: 0; }
.originals-chat {
  grid-area: chat;
  height: clamp(480px, 72vh, 820px);
  position: sticky;
  top: calc(var(--topbar-height) + var(--space-4));
}
.originals-layout.is-chat-hidden .originals-chat { display: none; }

@media (max-width: 1100px) {
  .originals-layout,
  .originals-layout.is-chat-hidden {
    grid-template-columns: 1fr;
    grid-template-areas: "game" "bet";
  }
  .originals-chat { display: none; }
}

/* ============================================================ Mobile bottom nav */
.bottom-nav { display: none; }

@media (max-width: 1024px) {
  .app { grid-template-columns: var(--sidebar-width-collapsed) 1fr; }
}

@media (max-width: 768px) {
  /* Match .app.is-sidebar-collapsed specificity so the collapsed-sidebar column rule
     (set globally) can't keep a phantom sidebar track here and squash .main. */
  .app,
  .app.is-sidebar-collapsed {
    grid-template-columns: 1fr;
    grid-template-rows: var(--topbar-height) 1fr;
    grid-template-areas:
      "topbar"
      "main";
  }
  .sidebar { display: none; }
  .topbar__search { display: none; }
  .main { padding: var(--space-4); padding-bottom: calc(var(--bottomnav-height) + var(--space-4)); }
  .hero__slide h2, .hero__slide p { max-width: 100%; }
  .hero__slide { padding: var(--space-5); min-height: 180px; }
  .hero__arrow { display: none; }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    height: var(--bottomnav-height);
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    z-index: 100;
  }
  .bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    color: var(--color-text-tertiary);
  }
  .bottom-nav__item.is-active { color: var(--color-accent); }
  .bottom-nav__item svg { width: auto; height: 22px; }
}

/* ============================================================ Page loading polish */
/* Top navigation progress bar (full-page navigations + initial load). */
.gt-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 4000;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease 0.1s;
}
.gt-progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--color-accent), #0EA5E9);
  box-shadow: 0 0 8px var(--color-accent);
  transition: width 0.25s ease;
}
@media (prefers-reduced-motion: reduce) { .gt-progress { display: none; } }

/* Gentle fade-in of the page shell on each load so content doesn't pop in. */
@keyframes gtFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.app, .auth-page { animation: gtFadeIn 0.32s ease both; }
@media (prefers-reduced-motion: reduce) { .app, .auth-page { animation: none; } }

/* Soften the skeleton→content swap inside carousels/cards. */
.game-card:not(.skeleton), .wincard, .rtcard { animation: gtFadeIn 0.3s ease both; }
@media (prefers-reduced-motion: reduce) { .game-card, .wincard, .rtcard { animation: none; } }
