:root {
  /* ===== COLORS ===== */
  --bg-deep: #07020F;
  --bg-purple: #120622;

  --accent-purple: #A855F7;
  --accent-violet: #6D28D9;
  --accent-gold-start: #FFCC33;
  --accent-gold-end: #FF9900;

  --text-primary: rgba(255,255,255,0.92);
  --text-secondary: rgba(255,255,255,0.68);

  --glass-bg: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.10);

  --shadow-purple: rgba(168, 85, 247, 0.35);
  --shadow-gold: rgba(255, 176, 0, 0.35);

  /* ===== RADIUS ===== */
  --radius-card: 24px;
  --radius-pill: 999px;
  --radius-small: 14px;

  /* ===== SPACING ===== */
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;

  /* ===== ANIMATION ===== */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.4s ease;

  /* ===== Z-INDEX ===== */
  --z-nav: 20;
  --z-toast: 30;
}
/* ===============================
   SV ARENA DESIGN SYSTEM (layout.css)
   Global layout + sensible resets for Telegram WebApp
================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(circle at 50% 20%, #2a0f4a 0%, #120622 40%, #07020F 100%);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Telegram WebApp often needs this to avoid white flash on overscroll */
#root {
  min-height: 100vh;
}

/* Tap friendliness */
button, [role="button"] {
  -webkit-tap-highlight-color: transparent;
}

/* Basic links */
a {
  color: inherit;
  text-decoration: none;
}

/* Generic containers (legacy) */
.app-container {
  padding: var(--space-20);
}

.section {
  margin-bottom: var(--space-24);
}

/* Generic topbar (legacy) */
.topbar {
  position: sticky;
  top: 0;
  padding: var(--space-16) var(--space-20);
  backdrop-filter: blur(20px);
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}
/* ===============================
   SV ARENA DESIGN SYSTEM
================================= */

/* ===== BALANCE ===== */
.balance-pill {
  background: linear-gradient(
    135deg,
    var(--accent-gold-start),
    var(--accent-gold-end)
  );
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  letter-spacing: 0.4px;
  box-shadow: 0 0 22px rgba(255, 176, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.balance-pill:active {
  transform: scale(0.97);
  box-shadow: 0 0 30px rgba(255, 176, 0, 0.65);
}


/* ===== GAME CARD ===== */
.game-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-card);
  padding: var(--space-16);
  margin-bottom: var(--space-16);
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  background: radial-gradient(circle at top right, rgba(168,85,247,0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-card:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.35);
  border-color: rgba(168,85,247,0.4);
}

.game-card:hover::before {
  opacity: 1;
}

.game-card:active {
  transform: scale(0.97);
}

.game-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.game-card .muted {
  font-size: 13px;
  color: var(--text-secondary);
}


/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 75px;
  backdrop-filter: blur(30px);
  background: rgba(255,255,255,0.05);
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 20;
}

.nav-item {
  color: var(--text-secondary);
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-item.active {
  color: var(--accent-purple);
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
  transform: translateY(-1px);
}
/* ===============================
   APP STORE / SUPERCELL TILES
================================= */

.gameTiles{
  display: grid;
  gap: 12px;
}

/* tile base */
.gameTile{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(18px);
  overflow: hidden;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  will-change: transform;
}

/* “cover light” overlay */
.gameTile::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(circle at 75% 20%, rgba(168,85,247,0.22), transparent 55%),
    radial-gradient(circle at 20% 90%, rgba(255,176,0,0.16), transparent 55%);
  opacity: .95;
  pointer-events:none;
}

/* glossy streak */
.gameTile::after{
  content:"";
  position:absolute;
  top:-40%;
  left:-30%;
  width: 60%;
  height: 180%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent);
  opacity: .35;
  pointer-events:none;
}

/* hover / press */
.gameTile:hover{
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(168,85,247,0.35);
  box-shadow: 0 0 34px rgba(168,85,247,0.25);
}
.gameTile:active{
  transform: scale(0.98);
}

/* badge */
.gameTileBadge{
  position:absolute;
  top: 12px;
  left: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(255,255,255,0.92);
  background: rgba(168,85,247,0.18);
  border: 1px solid rgba(255,255,255,0.10);
}

/* text */
.gameTileText{ display:flex; flex-direction:column; gap: 3px; }
.gameTileTitle{
  font-size: 18px;
  font-weight: 950;
  letter-spacing: .2px;
}
.gameTileSub{
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.68);
}

/* icon */
.gameTileIcon{
  font-size: 28px;
  filter: drop-shadow(0 0 10px rgba(168,85,247,0.18));
  opacity: .95;
}

/* disabled */
.isDisabled{
  opacity: .55;
  cursor: not-allowed;
}
.isDisabled:hover{
  transform:none;
  box-shadow:none;
  border-color: rgba(255,255,255,0.10);
}

/* subtle pulse for main featured game */
@keyframes saPulse {
  0% { box-shadow: 0 0 22px rgba(168,85,247,0.18); }
  50% { box-shadow: 0 0 34px rgba(168,85,247,0.32); }
  100% { box-shadow: 0 0 22px rgba(168,85,247,0.18); }
}
.gameTile--monopoly{
  animation: saPulse 7s ease-in-out infinite;
}

/* ===============================
   2x2 HUB TILES (reference style)
   Requires files in: /img/hub-bg.webp, /img/monopoly-cover.webp, /img/seabattle-cover.webp
================================= */

.saPage{
  background:
    radial-gradient(circle at 50% 18%, rgba(42,15,74,0.45) 0%, rgba(18,6,34,0.55) 45%, rgba(7,2,15,0.90) 100%),
    url("/static/img/hub-bg.webp");
  background-size: cover;
  background-position: center;
}

.saGrid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.saTile{
  position:relative;
  border-radius: 22px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(14px);
  aspect-ratio: 1 / 1;
  cursor:pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.saTile:hover{
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(168,85,247,0.40);
  box-shadow: 0 0 36px rgba(168,85,247,0.30);
}

.saTile:active{ transform: scale(0.98); }

.saTileTop{
  position:absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display:flex;
  justify-content:flex-start;
}

.saBadge{
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  background: rgba(168,85,247,0.18);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);
}

.saTileBottom{
  position:absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 10px 10px;
  border-radius: 16px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
}

.saTileTitle{
  font-weight: 950;
  letter-spacing: 0.8px;
  font-size: 14px;
}

.saTileSub{
  margin-top: 3px;
  font-weight: 800;
  font-size: 12px;
  opacity: 0.78;
}

.saTileSoon{
  font-weight: 900;
  letter-spacing: 1px;
  font-size: 12px;
  opacity: 0.8;
  text-align:center;
}

.saTileCenter{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 44px;
  font-weight: 900;
  opacity: 0.35;
}

.saTile.saDisabled{ opacity: 0.55; cursor:not-allowed; }
.saTile.saDisabled:hover{ transform:none; box-shadow:none; border-color: rgba(255,255,255,0.10); }

.saTile--monopoly{
  background-image:
    linear-gradient(135deg, rgba(0,0,0,0.22), rgba(0,0,0,0.55)),
    url("/static/img/monopoly-cover.webp");
  background-size: cover;
  background-position: center;
}

.saTile--sea{
  background-image:
    linear-gradient(135deg, rgba(0,0,0,0.22), rgba(0,0,0,0.55)),
    url("/static/img/seabattle-cover.webp");
  background-size: cover;
  background-position: center;
}

.saTile--uno{
  background-image:
    linear-gradient(135deg, rgba(0,0,0,0.22), rgba(0,0,0,0.55)),
    url("/static/img/uno-cover.webp");
  background-size: cover;
  background-position: center;
}
/* ===============================
   PREMIUM TOPBAR
================================= */

.saTopbar{
  padding: 18px 16px 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-radius: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(20px);
}

.saTopbarInner{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.saTitleBlock{
  display:flex;
  flex-direction:column;
}

.saTitle{
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(90deg,#ffffff,#a855f7,#ffcc33);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.saSubtitle{
  font-size: 12px;
  opacity: 0.6;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* ===== Balance pill ===== */

.saBalance{
  display:flex;
  align-items:center;
  gap:8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  cursor:pointer;
  background: linear-gradient(135deg,#ffcc33,#ff9900);
  color:#000;
  box-shadow:
    0 0 20px rgba(255,176,0,0.4),
    inset 0 0 10px rgba(255,255,255,0.3);
  transition: transform .2s ease, box-shadow .2s ease;
  user-select: none;
}

.saBalance:hover{
  transform: scale(1.05);
  box-shadow:
    0 0 30px rgba(255,176,0,0.6),
    inset 0 0 12px rgba(255,255,255,0.35);
}

.saBalance:active{
  transform: scale(0.98);
}

.saBalanceIcon{
  font-size:14px;
}

.saBalanceValue{
  font-size:14px;
}

.saBalanceUnit{
  font-size:12px;
  opacity:0.8;
}

/* ===============================
   LOBBY UI KIT (SV ARENA)
================================= */

.saCard{
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 14px;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.55);
}

.saH1{
  font-size: 22px;
  font-weight: 950;
  letter-spacing: .4px;
  margin: 10px 0 4px;
}

.saH2{
  font-size: 14px;
  font-weight: 900;
  opacity: .85;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin: 16px 0 10px;
}

.saRow{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
}

.saBtn{
  appearance: none;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.saBtn:hover{
  transform: translateY(-1px);
  border-color: rgba(168,85,247,0.45);
  box-shadow: 0 0 24px rgba(168,85,247,0.22);
}

.saBtn:active{ transform: scale(.98); }

.saBtnGold{
  background: linear-gradient(135deg,#ffcc33,#ff9900);
  color:#000;
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 0 24px rgba(255,176,0,0.35);
}

.saBtnGhost{
  background: rgba(0,0,0,0.25);
}

.saBtn:disabled{
  opacity:.45;
  cursor:not-allowed;
  box-shadow:none;
  transform:none;
}

.saInput{
  width: 100%;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);
  border-radius: 14px;
  padding: 10px 12px;
  outline: none;
}

.saInput:focus{
  border-color: rgba(168,85,247,0.55);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.18);
}

.saMuted{
  opacity: .7;
  font-weight: 700;
}

.saDivider{
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 12px 0;
}

.saPill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  font-weight: 900;
  opacity:.9;
}

/* optional: collapsible “full map” */
.saDetails{
  margin-top: 10px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.35);
}
.saSummary{
  list-style:none;
  padding: 12px 12px;
  cursor:pointer;
  font-weight: 900;
  opacity:.9;
}
.saDetailsContent{
  padding: 12px;
}