/* =========================================================
   TRUFFLE — STAKE-LIKE UI SYSTEM (FULL FILE)
   Compatible with:
   - public/index.html (sections: #page-*)
   - public/app.js (sidebar, auth, games, etc.)
   - Plitris animation math: CELL 40, piece 36, offset +2
========================================================= */

/* =========================================================
   1) THEME TOKENS
========================================================= */

:root{
  /* Base */
  --bg0:#070A11;
  --bg1:#0A0F1C;
  --bg2:#0E1528;

  /* Surfaces */
  --surface0: rgba(255,255,255,.03);
  --surface1: rgba(255,255,255,.05);
  --surface2: rgba(255,255,255,.07);
  --surface3: rgba(255,255,255,.09);

  /* Borders */
  --border0: rgba(255,255,255,.06);
  --border1: rgba(255,255,255,.09);
  --border2: rgba(255,255,255,.12);

  /* Text */
  --text0: rgba(245,247,255,.95);
  --text1: rgba(245,247,255,.86);
  --text2: rgba(245,247,255,.68);
  --text3: rgba(245,247,255,.52);

  /* Accent (Stake-ish purple/pink) */
  --accent0:#7C3CFF; /* purple */
  --accent1:#FF2D77; /* pink */
  --accent2:#2DE2E6; /* cyan (sparingly) */

  /* Status */
  --good:#2EE59D;
  --bad:#FF4D4D;
  --warn:#FFCC66;

  /* Shadows */
  --shadow0: 0 10px 28px rgba(0,0,0,.45);
  --shadow1: 0 18px 60px rgba(0,0,0,.55);
  --shadow2: 0 26px 90px rgba(0,0,0,.62);

  /* Radius */
  --r0: 10px;
  --r1: 14px;
  --r2: 18px;
  --r3: 24px;

  /* Spacing */
  --s1: 6px;
  --s2: 10px;
  --s3: 14px;
  --s4: 18px;
  --s5: 22px;

  /* Typography */
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* Sizes */
  --topbar-h: 62px;
  --sidebar-w: 280px;

  /* Inputs */
  --input-h: 42px;
}

/* =========================================================
   2) RESET / BASE
========================================================= */

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  font-family: var(--font);
  color: var(--text0);
  background:
    radial-gradient(900px 650px at 18% 10%, rgba(124,60,255,.18), transparent 55%),
    radial-gradient(900px 650px at 86% 18%, rgba(255,45,119,.14), transparent 58%),
    radial-gradient(900px 650px at 50% 110%, rgba(45,226,230,.10), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 42%, var(--bg2));
  min-height:100%;
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

button,input{
  font-family:inherit;
}

button{
  cursor:pointer;
  -webkit-tap-highlight-color: transparent;
}

::selection{
  background: rgba(124,60,255,.35);
}

/* Scrollbars */
*::-webkit-scrollbar{ height:10px; width:10px; }
*::-webkit-scrollbar-track{ background: rgba(255,255,255,.03); }
*::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.14);
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,.15);
}
*::-webkit-scrollbar-thumb:hover{ background: rgba(255,255,255,.20); }

/* =========================================================
   3) LAYOUT: TOPBAR / CONTAINER
========================================================= */

.topbar{
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--topbar-h);
  z-index: 1200;

  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0 16px;

  background:
    linear-gradient(180deg, rgba(10,15,28,.92), rgba(10,15,28,.72));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border0);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.topbar-left,
.topbar-right{
  display:flex;
  align-items:center;
  gap: 12px;
}

.container{
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 18px) 16px 44px;
}

/* =========================================================
   4) ICON BUTTON + BURGER
========================================================= */

.icon-btn{
  width: 38px;
  height: 38px;
  border: 1px solid var(--border0);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  color: var(--text0);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.icon-btn:hover{
  background: rgba(255,255,255,.06);
  border-color: var(--border1);
}
.icon-btn:active{
  transform: translateY(1px);
}

.burger{
  width: 18px;
  height: 2px;
  background: var(--text0);
  display:block;
  position: relative;
  border-radius: 4px;
}
.burger::before,
.burger::after{
  content:"";
  position:absolute;
  left:0;
  width: 18px;
  height: 2px;
  background: var(--text0);
  border-radius: 4px;
}
.burger::before{ top:-6px; opacity:.95; }
.burger::after{ top: 6px; opacity:.95; }

/* =========================================================
   5) BRAND
========================================================= */

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  user-select:none;
}

.brand-badge{
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  letter-spacing: .5px;

  background:
    radial-gradient(14px 14px at 30% 30%, rgba(255,255,255,.34), transparent 60%),
    linear-gradient(135deg, rgba(124,60,255,.92), rgba(255,45,119,.92));
  box-shadow: 0 12px 26px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.10);
}

.brand-text{ display:flex; flex-direction:column; line-height:1.05; }
.brand-title{ font-weight: 900; font-size: 14px; color: var(--text0); }
.brand-sub{ font-size: 12px; color: var(--text2); margin-top: 2px; }

/* =========================================================
   6) CHIPS / BALANCE CHIP
========================================================= */

.chip{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border0);
  background: rgba(255,255,255,.03);
  color: var(--text1);
  font-size: 13px;
  line-height: 1;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.chip .chip-label{ color: var(--text3); font-weight: 700; letter-spacing:.2px; }
.chip .chip-value{ color: var(--text0); font-weight: 900; }

.chip-btn{
  cursor:pointer;
}
.chip-btn:hover{
  background: rgba(255,255,255,.06);
  border-color: var(--border1);
}
.chip-btn:active{
  transform: translateY(1px);
}

/* Special: balance chip look */
.chip-btn .chip-value{
  display:flex;
  align-items:center;
  gap:6px;
}
.chip-btn .chip-value::before{
  content:"$";
  color: rgba(245,247,255,.85);
  font-weight: 900;
  opacity:.85;
}

/* =========================================================
   7) BUTTONS
========================================================= */

.btn{
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border0);
  background: rgba(255,255,255,.03);
  color: var(--text0);
  font-weight: 850;
  font-size: 13px;
  letter-spacing: .2px;

  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;

  transition: transform .12s ease, background .12s ease, border-color .12s ease, filter .12s ease;
}

.btn:hover{
  background: rgba(255,255,255,.06);
  border-color: var(--border1);
}

.btn:active{
  transform: translateY(1px);
}

.btn:disabled{
  opacity: .45;
  cursor:not-allowed;
  transform:none;
}

.btn-primary{
  border: 0;
  background:
    radial-gradient(18px 18px at 30% 30%, rgba(255,255,255,.26), transparent 60%),
    linear-gradient(135deg, rgba(124,60,255,.95), rgba(255,45,119,.92));
  box-shadow: 0 14px 40px rgba(124,60,255,.18);
}
.btn-primary:hover{
  filter: brightness(1.06);
}
.btn-ghost{
  background: transparent;
  border: 1px solid var(--border1);
}
.btn-sm{
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 10px;
}

/* =========================================================
   8) SIDEBAR + OVERLAY
========================================================= */

.sidebar{
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  z-index: 1300;

  transform: translateX(-104%);
  transition: transform .18s ease;

  background:
    linear-gradient(180deg, rgba(10,15,28,.96), rgba(10,15,28,.82));
  backdrop-filter: blur(12px);

  border-right: 1px solid var(--border0);
  box-shadow: 26px 0 80px rgba(0,0,0,.55);

  display:flex;
  flex-direction:column;
}

.sidebar.active{
  transform: translateX(0);
}

.sidebar-head{
  height: var(--topbar-h);
  padding: 0 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom: 1px solid var(--border0);
}

.sidebar-title{
  font-weight: 950;
  letter-spacing:.2px;
}

.nav{
  padding: 12px;
  overflow:auto;
  flex:1;
}

.nav-section{
  margin: 12px 6px 8px;
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .9px;
}

.nav-link{
  position: relative;
  display:flex;
  align-items:center;
  gap: 10px;

  padding: 10px 12px;
  border-radius: 14px;

  color: var(--text2);
  border: 1px solid transparent;
  background: transparent;

  transition: background .12s ease, border-color .12s ease, color .12s ease, transform .12s ease;
}

.nav-link:hover{
  background: rgba(255,255,255,.05);
  border-color: var(--border0);
  color: var(--text0);
}

.nav-link.active{
  background:
    radial-gradient(16px 16px at 30% 30%, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(135deg, rgba(124,60,255,.28), rgba(255,45,119,.22));
  border-color: rgba(124,60,255,.28);
  color: var(--text0);
}

.nav-foot{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border0);
  color: var(--text3);
  font-size: 12px;
}

.nav-link.small{
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
}

/* Emoji icons in menu WITHOUT touching HTML:
   uses data-page attr on links in index.html */
.nav-link[data-page]::before{
  content:"•";
  width: 20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  opacity:.92;
  transform: translateY(-.5px);
}

.nav-link[data-page="home"]::before{ content:"🏠"; }
.nav-link[data-page="dice"]::before{ content:"🎲"; }
.nav-link[data-page="mines"]::before{ content:"💣"; }
.nav-link[data-page="crash"]::before{ content:"📈"; }
.nav-link[data-page="plitris"]::before{ content:"⚪"; }
.nav-link[data-page="cases"]::before{ content:"🎁"; }

.nav-link[data-page="balance"]::before{ content:"💳"; }
.nav-link[data-page="partners"]::before{ content:"🤝"; }
.nav-link[data-page="fairness"]::before{ content:"🧾"; }
.nav-link[data-page="account"]::before{ content:"👤"; }
.nav-link[data-page="support"]::before{ content:"💬"; }

.overlay{
  position: fixed;
  inset:0;
  z-index: 1250;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(2px);
  display:none;
}
.overlay.active{ display:block; }

/* =========================================================
   9) TYPOGRAPHY / HEADERS / HELPERS
========================================================= */

.page{
  animation: pageIn .14s ease;
}
@keyframes pageIn{
  from{ opacity:0; transform: translateY(4px); }
  to{ opacity:1; transform: translateY(0); }
}

.page-head{
  display:flex;
  flex-direction:column;
  gap: 6px;
  margin-bottom: 14px;
}

.h1{
  margin: 0;
  font-size: 28px;
  font-weight: 980;
  letter-spacing: -.3px;
}

.muted{
  color: var(--text2);
  font-size: 13px;
}

.hr{
  height:1px;
  background: var(--border0);
  margin: 12px 0;
}

.mono{ font-family: var(--mono); }
.pre{
  margin: 0;
  white-space: pre-wrap;
  background: rgba(0,0,0,.28);
  border: 1px solid var(--border0);
  border-radius: 14px;
  padding: 10px 12px;
  color: rgba(245,247,255,.80);
  font-size: 12px;
  line-height: 1.35;
}

/* =========================================================
   10) GRIDS
========================================================= */

.grid-games{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

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

.grid-3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 980px){
  .grid-2{ grid-template-columns: 1fr; }
  .grid-3{ grid-template-columns: 1fr; }
}

/* =========================================================
   11) CARDS / PANELS
========================================================= */

.card,
.panel{
  border-radius: var(--r2);
  border: 1px solid var(--border0);
  background:
    radial-gradient(24px 24px at 18% 16%, rgba(255,255,255,.06), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow: var(--shadow0);
  overflow:hidden;
}

.card-head,
.panel-title{
  padding: 12px 14px;
  border-bottom: 1px solid var(--border0);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.card-title,
.panel-title{
  font-weight: 950;
  letter-spacing: .15px;
}

.card-body,
.panel-body{
  padding: 14px;
}

.card-actions{
  display:flex;
  align-items:center;
  gap: 8px;
}

/* =========================================================
   12) FORMS
========================================================= */

.label{
  display:block;
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text3);
  font-weight: 850;
  letter-spacing:.2px;
}

.input{
  width: 100%;
  height: var(--input-h);
  padding: 0 12px;

  border-radius: 14px;
  border: 1px solid var(--border0);
  background: rgba(0,0,0,.22);
  color: var(--text0);

  outline: none;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}

.input:hover{
  border-color: var(--border1);
  background: rgba(0,0,0,.26);
}

.input:focus{
  border-color: rgba(124,60,255,.55);
  box-shadow: 0 0 0 3px rgba(124,60,255,.18);
  background: rgba(0,0,0,.28);
}

.row{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================
   13) TABLES
========================================================= */

.tablewrap{
  overflow:auto;
  border-radius: var(--r2);
  border: 1px solid var(--border0);
  background: rgba(0,0,0,.18);
}

.table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table thead th{
  text-align:left;
  padding: 10px 12px;
  color: var(--text3);
  font-weight: 900;
  letter-spacing:.35px;
  border-bottom: 1px solid var(--border0);
  background: rgba(255,255,255,.02);
}

.table tbody td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  color: var(--text1);
}

.table tbody tr:hover td{
  background: rgba(255,255,255,.02);
}

.table .muted{
  color: var(--text3);
}

/* =========================================================
   14) GAME CARDS (HOME)
========================================================= */

.game-card{
  border-radius: var(--r2);
  border: 1px solid var(--border0);
  background:
    radial-gradient(60px 60px at 18% 10%, rgba(124,60,255,.16), transparent 60%),
    radial-gradient(80px 80px at 90% 20%, rgba(255,45,119,.12), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow: var(--shadow0);
  overflow:hidden;

  display:flex;
  flex-direction:column;
  min-height: 220px;

  transition: transform .14s ease, border-color .14s ease, filter .14s ease;
}

.game-card:hover{
  transform: translateY(-3px);
  border-color: rgba(124,60,255,.26);
  filter: brightness(1.03);
}

.game-thumb{
  height: 130px;
  background: rgba(0,0,0,.22);
  border-bottom: 1px solid var(--border0);
}

.game-thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.game-info{
  padding: 12px 14px 10px;
  flex:1;
}

.game-title{
  font-weight: 980;
  letter-spacing:.1px;
  margin-bottom: 4px;
}

.game-desc{
  color: var(--text2);
  font-size: 13px;
}

.game-go{
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border0);
  color: rgba(124,60,255,.95);
  font-weight: 900;
  font-size: 13px;
  display:flex;
  justify-content:flex-end;
}

/* =========================================================
   15) DICE
========================================================= */

.dice-face{
  display:flex;
  justify-content:center;
  margin-top: 10px;
}

.dice-num{
  min-width: 120px;
  text-align:center;
  font-size: 34px;
  font-weight: 980;
  letter-spacing: .5px;

  padding: 12px 18px;
  border-radius: 16px;

  background:
    radial-gradient(18px 18px at 30% 30%, rgba(255,255,255,.14), transparent 60%),
    rgba(0,0,0,.22);

  border: 1px solid var(--border0);
  box-shadow: inset 0 -18px 30px rgba(0,0,0,.30);
}

/* =========================================================
   16) MINES
========================================================= */

.mines-grid{
  display:grid;
  grid-template-columns: repeat(5, 52px);
  gap: 8px;
  justify-content: center;
  padding: 6px 0;
}

.mines-cell{
  width: 52px;
  height: 52px;
  border-radius: 16px;

  border: 1px solid var(--border0);
  background:
    radial-gradient(16px 16px at 30% 30%, rgba(255,255,255,.08), transparent 60%),
    rgba(0,0,0,.22);

  display:flex;
  align-items:center;
  justify-content:center;

  transition: transform .10s ease, border-color .10s ease, background .10s ease, filter .10s ease;
}

.mines-cell:hover{
  transform: translateY(-1px);
  border-color: var(--border1);
  background: rgba(0,0,0,.26);
}

.mines-cell.revealed.safe{
  border-color: rgba(46,229,157,.35);
  box-shadow: 0 0 0 3px rgba(46,229,157,.10);
}
.mines-cell.revealed.mine{
  border-color: rgba(255,77,77,.38);
  box-shadow: 0 0 0 3px rgba(255,77,77,.10);
}

.mini-ico{ width: 18px; height:18px; }

/* =========================================================
   17) CRASH
========================================================= */

.crash-box{ margin-top: 10px; }
.crash-mult{
  text-align:center;
  font-size: 30px;
  font-weight: 980;
  letter-spacing: -.2px;
}

.crash-bar{
  height: 10px;
  border-radius: 999px;
  overflow:hidden;
  margin-top: 10px;

  border: 1px solid var(--border0);
  background: rgba(0,0,0,.22);
}

.crash-line{
  height:100%;
  width:0;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(124,60,255,.95), rgba(255,45,119,.92));
  box-shadow: 0 0 24px rgba(124,60,255,.25);
}

/* =========================================================
   18) PLITRIS (PIXEL-PERFECT)
   Matches app.js: CELL=40, piece offset +2, piece 36
========================================================= */

.plitris-board{
  padding: 0 !important;

  display:grid;
  grid-template-columns: repeat(8, 40px);
  grid-template-rows: repeat(8, 40px);
  gap: 2px;

  position: relative;
  width: max-content;
  margin: 0 auto;

  background: rgba(0,0,0,.20);
  border: 1px solid var(--border0);
  border-radius: 18px;
  box-shadow: var(--shadow0);
}

.plitris-cell{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06);

  background: rgba(255,255,255,.03);
  color: rgba(245,247,255,.55);
  font-size: 11px;

  display:flex;
  align-items:center;
  justify-content:center;
}

.plitris-slot{
  width: 40px;
  height: 40px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);

  color: rgba(245,247,255,.92);
  font-weight: 980;
  font-size: 11px;

  display:flex;
  align-items:center;
  justify-content:center;

  box-shadow: inset 0 -12px 20px rgba(0,0,0,.22);
}

.plitris-piece{
  width: 36px;
  height: 36px;
  border-radius: 999px;

  position:absolute;
  left: 2px;
  top: 2px;

  transition: .22s linear;

  background:
    radial-gradient(14px 14px at 28% 28%, rgba(255,255,255,.38), transparent 55%),
    radial-gradient(20px 20px at 65% 70%, rgba(0,0,0,.22), transparent 60%),
    linear-gradient(135deg, rgba(124,60,255,.96), rgba(255,45,119,.92));

  box-shadow:
    0 0 0 1px rgba(255,255,255,.10),
    0 16px 42px rgba(0,0,0,.50);
}

@media (max-width: 420px){
  .plitris-board{
    transform: scale(.92);
    transform-origin: top center;
  }
}

/* =========================================================
   19) CASES
========================================================= */

.cases-list{
  display:grid;
  gap: 12px;
}

.case-grid{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

@media (max-width: 520px){
  .case-grid{ grid-template-columns: repeat(2, 1fr); }
}

.case-card-tile{
  height: 88px;
  border-radius: 18px;

  border: 1px solid var(--border0);
  background:
    radial-gradient(20px 20px at 30% 30%, rgba(255,255,255,.10), transparent 60%),
    rgba(0,0,0,.22);

  box-shadow: inset 0 -20px 36px rgba(0,0,0,.22);
  cursor:pointer;
  perspective: 900px;

  transition: transform .12s ease, border-color .12s ease, filter .12s ease;
}

.case-card-tile:hover{
  transform: translateY(-2px);
  border-color: rgba(124,60,255,.22);
  filter: brightness(1.02);
}

.case-card-tile .inner{
  width:100%;
  height:100%;
  position:relative;
  transform-style: preserve-3d;
  transition: transform .42s cubic-bezier(.2,.9,.2,1);
}

.case-card-tile.flipped .inner{
  transform: rotateY(180deg);
}

.case-card-tile .front,
.case-card-tile .back{
  position:absolute;
  inset:0;
  backface-visibility:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}

.case-card-tile .front{
  color: rgba(245,247,255,.92);
  font-weight: 980;
  font-size: 18px;
}

.case-card-tile .back{
  transform: rotateY(180deg);
}

/* =========================================================
   20) MODAL (AUTH)
========================================================= */

.modal{
  position: fixed;
  inset:0;
  z-index: 2000;

  display:none;
  align-items:center;
  justify-content:center;

  background: rgba(0,0,0,.68);
  backdrop-filter: blur(6px);
}

.modal.active{ display:flex; }

.modal-card{
  width: min(920px, calc(100vw - 24px));
  border-radius: 22px;
  overflow:hidden;

  border: 1px solid var(--border0);
  background:
    radial-gradient(240px 240px at 18% 10%, rgba(124,60,255,.18), transparent 55%),
    radial-gradient(240px 240px at 90% 20%, rgba(255,45,119,.14), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));

  box-shadow: var(--shadow2);
}

.modal-head{
  padding: 14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom: 1px solid var(--border0);
}

.modal-title{
  font-weight: 980;
  letter-spacing:.2px;
}

.modal-body{ padding: 16px; }

.modal-foot{
  padding: 14px 16px;
  border-top: 1px solid var(--border0);
  display:flex;
  justify-content:flex-end;
}

/* =========================================================
   21) ACCOUNT
========================================================= */

.acc-top{
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items:flex-start;
}

.acc-kv{
  flex: 1;
  min-width: 240px;
  display:flex;
  flex-direction:column;
  gap: 6px;
}

.acc-tabs{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab{
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;

  border: 1px solid var(--border0);
  background: rgba(255,255,255,.03);
  color: var(--text1);
  font-weight: 900;
  font-size: 12px;
  letter-spacing:.2px;

  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.tab:hover{
  background: rgba(255,255,255,.06);
  border-color: var(--border1);
}

.tab:active{
  transform: translateY(1px);
}

.acc-tab{ margin-top: 12px; }

.histbox{
  max-height: 280px;
  overflow:auto;
  border-radius: 16px;
  border: 1px solid var(--border0);
  background: rgba(0,0,0,.20);
  padding: 8px;
}

/* =========================================================
   22) UTILS: COPY ROW / BTN ROW
========================================================= */

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

.copyrow{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
}

.copytext{
  flex:1;
  min-width: 220px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border0);
  background: rgba(0,0,0,.22);
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   23) FOOTER
========================================================= */

.footer{
  margin-top: 28px;
  text-align:center;
  color: var(--text3);
  font-size: 12px;
}

/* =========================================================
   24) SMALL FIXES / SAFETY
========================================================= */

/* prevent weird overflow on mobile when sidebar open */
body{
  overflow-x:hidden;
}

/* Make sections breathe */
section.page{
  padding-bottom: 10px;
}

/* Better link focus */
a:focus-visible,
button:focus-visible,
input:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(124,60,255,.22);
  border-radius: 14px;
}

/* If someone uses <b> inside muted */
.muted b{
  color: rgba(245,247,255,.88);
}

/* =========================================================
   END
========================================================= */



/* =========================================================
   STAKE STYLE OVERRIDE (append at end of style.css)
   - 5 game cards in a row on desktop
   - square thumbnails
   - no neon, clean dark UI
   - logo badge without background
========================================================= */

/* ---------- Theme cleanup (less "neon") ---------- */
:root{
  --bg: #0b0f14;
  --bg2:#0b0f14;
  --panel:#0f1722;
  --panel2:#111b28;

  --primary:#2e7dff;     /* аккуратный голубой акцент */
  --primary2:#1f5fd6;

  --text:#e7eef8;
  --muted:#97a7bd;

  --border: rgba(255,255,255,.08);
  --shadow: 0 8px 24px rgba(0,0,0,.45);

  --radius: 14px;
  --radius-sm: 10px;
}

/* Фон страницы ровный, без "красного глоу" */
html, body{
  background: radial-gradient(1200px 800px at 20% -10%, rgba(46,125,255,.10), transparent 60%),
              radial-gradient(900px 600px at 90% 0%, rgba(46,125,255,.06), transparent 55%),
              #0b0f14;
  color: var(--text);
}

/* ---------- Topbar cleaner ---------- */
.topbar{
  background: rgba(15, 23, 34, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.chip{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  color: var(--text);
}

.chip-label{ color: var(--muted); }
.chip-value{ color: var(--text); }

/* Balance chip: выглядит "дорого" */
.chip-btn{
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.chip-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  border-color: rgba(46,125,255,.25);
}

/* ---------- Buttons: no neon ---------- */
.btn{
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.10);
}
.btn-primary{
  border: 1px solid rgba(46,125,255,.35);
  background: linear-gradient(180deg, rgba(46,125,255,.95), rgba(31,95,214,.95));
  box-shadow: 0 10px 24px rgba(46,125,255,.18);
}
.btn-primary:hover{
  filter: none;
  border-color: rgba(46,125,255,.55);
  box-shadow: 0 12px 28px rgba(46,125,255,.22);
}
.btn-ghost{
  background: transparent;
  border: 1px solid rgba(255,255,255,.08);
}
.btn-ghost:hover{
  background: rgba(255,255,255,.05);
}

/* ---------- Cards/Panels: stake-like ---------- */
.card, .panel{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 10px 26px rgba(0,0,0,.45);
}

.card-head, .panel-title{
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* ---------- Sidebar cleaner ---------- */
.sidebar{
  background: rgba(15, 23, 34, .94);
  border-right: 1px solid rgba(255,255,255,.06);
}

.nav-link{
  color: rgba(231,238,248,.70);
}
.nav-link:hover{
  background: rgba(255,255,255,.05);
  color: var(--text);
}
.nav-link.active{
  background: rgba(46,125,255,.18);
  border: 1px solid rgba(46,125,255,.22);
  color: #eaf2ff;
  font-weight: 700;
}

/* ---------- Logo badge: no background ---------- */
.brand-badge{
  background: transparent !important;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: none !important;
}

.brand-logo{
  padding: 0;
  overflow: hidden;
}

.brand-logo img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px; /* чтобы лого не липло к краям */
}

/* ---------- HOME: 5 in a row + square thumbs ---------- */
.grid-games--stake{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1200px){
  .grid-games--stake{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 760px){
  .grid-games--stake{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* Card layout: compact */
.game-card{
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
  transform: none !important;
  transition: border-color .12s ease, background .12s ease, transform .12s ease;
}

.game-card:hover{
  border-color: rgba(46,125,255,.25);
  background: rgba(255,255,255,.04);
  transform: translateY(-2px) !important;
}

/* Square thumbnail */
.game-thumb{
  height: auto !important;
  aspect-ratio: 1 / 1;          /* квадрат */
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.game-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;            /* красиво режет */
}

/* Reduce noise inside */
.game-info{
  padding: 10px 10px 6px;
}
.game-title{
  font-weight: 800;
  letter-spacing: .2px;
}
.game-desc{
  font-size: 12px;
  color: rgba(231,238,248,.62);
}

/* Remove neon footer line, make CTA subtle */
.game-go{
  padding: 8px 10px;
  border-top: 1px solid rgba(255,255,255,.06);
  color: rgba(231,238,248,.75);
  font-weight: 600;
}

/* ---------- Inputs: stake-like ---------- */
.input{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.input:focus{
  border-color: rgba(46,125,255,.45);
  box-shadow: 0 0 0 3px rgba(46,125,255,.14);
}

/* ---------- Overlay softer ---------- */
.overlay{
  background: rgba(0,0,0,.55);
}

/* ---------- Tables more clean ---------- */
.table th{
  color: rgba(151,167,189,.95);
}
.table td{
  color: rgba(231,238,248,.90);
}

/* ---------- Plitris: lighten load + correct falling feel (visual only) ---------- */
.plitris-board{
  gap: 3px;
}
.plitris-cell,
.plitris-slot{
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
  font-size: 12px;
}
.plitris-slot{
  background: rgba(255,255,255,.05);
  font-weight: 700;
}
.plitris-piece{
  box-shadow: 0 10px 22px rgba(46,125,255,.22);
}


/* ===== GGSaw red professional theme overrides ===== */
:root{
  --bg:#12070b;
  --bg-soft:#1a0b10;
  --card:#210d14;
  --line:#3b1624;
  --text:#ffecef;
  --muted:#d3a8b3;
  --accent:#ff2d55;
  --accent-2:#ff5a5f;
}
body{background:radial-gradient(circle at top,#2a0c16 0,#12070b 60%); color:var(--text)}
.topbar,.sidebar,.card,.modal-card,.panel{border-color:var(--line)!important; background:var(--card)!important}
.btn-primary{background:linear-gradient(135deg,var(--accent),var(--accent-2))!important; border:none!important}
.game-card{border-color:var(--line)!important; background:linear-gradient(160deg,#2b101a,#1c0c12)!important}

.mines-grid{grid-template-columns:repeat(5,minmax(56px,1fr))!important;gap:10px}
.mines-cell{height:56px!important;border-radius:12px!important;background:linear-gradient(145deg,#33131e,#220d15)!important;border:1px solid #4b1c2d!important;transition:all .15s ease}
.mines-cell:hover{transform:translateY(-2px) scale(1.01); box-shadow:0 8px 20px rgba(255,45,85,.25)}
.mines-cell.revealed.safe{background:linear-gradient(145deg,#2c1e30,#5f2a58)!important}
.mines-cell.revealed.mine{background:linear-gradient(145deg,#551425,#8a1f38)!important}

.keno-grid{display:grid;grid-template-columns:repeat(8,minmax(44px,1fr));gap:8px;margin-top:10px}
.keno-cell{height:42px;border-radius:10px;border:1px solid #4b1c2d;background:#250f18;color:#ffdce4;font-weight:700;cursor:pointer}
.keno-cell.selected{background:linear-gradient(135deg,#ff2d55,#ff7b7f);color:#fff;border-color:transparent}
.keno-cell.hit{outline:2px solid #ffd166}
