:root{
  --bg0:#0f0f10;
  --bg1:#171718;
  --card:rgba(255,255,255,0.06);
  --card2:rgba(255,255,255,0.08);
  --line:rgba(255,255,255,0.10);
  --text:#fff;
  --muted:rgba(255,255,255,0.72);
  --muted2:rgba(255,255,255,0.55);
  --accent:rgba(255,255,255,0.92);
  --accentText:#111;
  --shadow: 0 12px 40px rgba(0,0,0,0.35);
}

*{ box-sizing:border-box; }
html, body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* базовый тёмный фон */
  background-color: #0b0b0c;
  color: var(--text);
}


.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 14px 28px;
  position: relative;
}

/* верхний декоративный градиент */
.page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 420px;

  background: radial-gradient(
    1200px 600px at 50% 0%,
    #202022 0%,
    #141416 55%,
    rgba(20,20,22,0) 100%
  );

  pointer-events: none;
  z-index: -1;
}


/* ===== Topbar ===== */
.topbar{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
}

.logo{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
}

.title .h1{
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.title .hint{
  font-size: 12px;
  color: var(--muted2);
  margin-top: 2px;
}

.top-actions{
  display:flex;
  align-items:center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content:flex-end;
}

/* ===== Buttons / Inputs ===== */
button{
  border: none;
  border-radius: 16px;
  padding: 10px 16px;
  font-size: 15px;
  cursor: pointer;
  background: rgba(255,255,255,0.14);
  color: #fff;
  transition: transform 0.06s ease, background 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}
button:hover{ background: rgba(255,255,255,0.20); }
button:active{ transform: translateY(1px); }
button:disabled{ opacity: 0.45; cursor: not-allowed; }

.btn{ display:inline-flex; align-items:center; justify-content:center; gap:10px; }
.btn-lg{ padding: 12px 18px; font-size: 16px; border-radius: 18px; }
.btn-primary{ background: var(--accent); color: var(--accentText); }
.btn-primary:hover{ background: rgba(255,255,255,1); box-shadow: 0 10px 26px rgba(255,255,255,0.10); }
.btn-outline{ background: rgba(0,0,0,0.20); border: 1px solid rgba(255,255,255,0.18); }
.btn-outline:hover{ background: rgba(0,0,0,0.26); }
.btn-ghost{ background: rgba(255,255,255,0.10); }
.btn-ghost:hover{ background: rgba(255,255,255,0.16); }

.field{
  display:flex;
  flex-direction: column;
  gap: 6px;
}
.field span{
  font-size: 12px;
  color: var(--muted2);
}

input[type="number"], input[type="text"], select{
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.28);
  color: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  outline: none;
  font-size: 14px;
}
input:focus, select:focus{ border-color: rgba(255,255,255,0.35); }

.range{ width: 260px; }
.speed{ display:flex; flex-direction: column; gap:6px; align-items:flex-end; }
.speed-label{ font-size: 12px; color: var(--muted); }

/* ===== Stage ===== */
.stage{
  display:flex;
  flex-direction: column;
  gap: 14px;
}

.stage-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 16px;
  position: relative;
}

.stage-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  margin-bottom: 10px;
}

.stage-status{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill{
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
  font-weight: 800;
  font-size: 13px;
}

.stage-hint{
  font-size: 12px;
  color: var(--muted2);
}

.price-input{
  width: 72px;
}

.stage-controls{
  display:flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.voice-panel{
  display:flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.settings-grid{
  display:grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: start;
}

.settings-card{
  display:flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.08);
}

.settings-card-title{
  font-weight: 800;
  font-size: 13px;
}

.field-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}

.playlist{
  display:flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow: auto;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.08);
}

.playlist-item{
  display:flex;
  align-items:center;
  gap: 8px;
  font-size: 12px;
}

.playlist-empty{
  color: var(--muted2);
  font-size: 12px;
}

.settings-sliders{
  display:flex;
  flex-direction: column;
  gap: 12px;
}
.voice-meta{
  font-size: 12px;
  color: var(--muted2);
  padding: 10px 10px;
}

.play-controls{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.scene-content{
  position: relative;
}

.stage-mask{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(10, 10, 12, 0.85);
  border-radius: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  text-align: center;
  padding: 20px;
}

.stage-mask-title{
  font-size: 18px;
  font-weight: 800;
}

.stage-mask-subtitle{
  font-size: 12px;
  color: var(--muted2);
}

.stage-card.scene-hidden .stage-mask{
  opacity: 1;
}

.stage-card.scene-hidden .ball-stage,
.stage-card.scene-hidden .history-wrap{
  filter: blur(8px);
  opacity: 0.2;
}

/* ===== Bag panel ===== */
.bag-panel{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 10px;
}

.bag-title{
  font-weight: 800;
  font-size: 12px;
}

.bag-count{
  font-size: 12px;
  font-weight: 800;
}

.bag-progress{
  display:flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.bag-progress-bar{
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.bag-progress-fill{
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0.2), rgba(255,255,255,0.9));
  border-radius: 999px;
  transition: width 0.2s ease;
}

.bag-visual{
  display:none;
  align-items:center;
  gap: 10px;
}

.bag-visual-count{
  font-size: 13px;
  font-weight: 800;
}

.bag-visual-caption{
  font-size: 11px;
  color: var(--muted2);
}

.bag-stack{
  position: relative;
  width: 56px;
  height: 52px;
  border-radius: 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
}

.bag-stack-fill{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--bag-fill, 100%);
  background:
    radial-gradient(circle at 12px 12px, rgba(255,220,180,0.9) 0 7px, transparent 8px),
    radial-gradient(circle at 34px 24px, rgba(255,220,180,0.9) 0 7px, transparent 8px),
    radial-gradient(circle at 18px 36px, rgba(255,220,180,0.9) 0 7px, transparent 8px),
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(160,110,60,0.75));
  transition: height 0.2s ease;
}

.bag-panel[data-mode="bag"] .bag-stack{
  display:block;
}

.bag-panel[data-mode="bag"] .bag-progress{
  display:none;
}

.bag-panel[data-mode="bag"] .bag-visual{
  display:flex;
}

/* ===== Heatmap ===== */
.heatmap-panel{
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.08);
}

.heatmap-panel-tab{
  margin-top: 0;
}

.heatmap-header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.heatmap-title{
  font-weight: 800;
}

.heatmap-grid{
  display:grid;
  grid-template-columns: repeat(15, minmax(18px, 1fr));
  gap: 6px;
}

.heatmap-cell{
  height: 26px;
  display:grid;
  place-items:center;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.heatmap-cell.hot{
  background: rgba(255,99,132,0.35);
  border-color: rgba(255,99,132,0.6);
  box-shadow: 0 6px 14px rgba(255,99,132,0.2);
}

.heatmap-cell.warm{
  background: rgba(255,205,86,0.25);
  border-color: rgba(255,205,86,0.5);
}

.heatmap-cell.cold{
  background: rgba(100,181,246,0.15);
  border-color: rgba(100,181,246,0.35);
}

.heatmap-cell:hover{
  transform: translateY(-1px);
}

.heatmap-legend{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted2);
}

.legend-item{
  display:inline-flex;
  align-items:center;
  gap: 6px;
}

.legend-item::before{
  content:"";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display:inline-block;
}

.legend-item.cold::before{ background: rgba(100,181,246,0.6); }
.legend-item.warm::before{ background: rgba(255,205,86,0.6); }
.legend-item.hot::before{ background: rgba(255,99,132,0.7); }

/* ===== Big Lotto Ball ===== */
.ball-stage{
  display:flex;
  flex-direction: column;
  align-items:center;
  justify-content:center;
  padding: 10px 0 6px;
}

.lotto-ball{
  width: 220px;
  height: 220px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  font-weight: 900;
  font-size: 88px;
  letter-spacing: -1px;

  /* светлое дерево */
  background:
    radial-gradient(130px 130px at 30% 25%, rgba(255,255,255,0.35), rgba(255,255,255,0) 60%),
    radial-gradient(200px 200px at 60% 75%, rgba(0,0,0,0.40), rgba(0,0,0,0) 55%),
    radial-gradient(circle at 35% 35%, #f8e2bf 0%, #e6c18a 55%, #b38149 100%);

  /* красная окантовка + объем */
  box-shadow:
    inset 0 0 0 10px rgba(180, 28, 45, 0.95), /* красный обод */
    inset 0 10px 18px rgba(255,255,255,0.18),
    inset 0 -18px 24px rgba(0,0,0,0.30),
    0 18px 50px rgba(0,0,0,0.45);

  border: 1px solid rgba(255,255,255,0.14);
  position: relative;
  user-select: none;

  /* текст цифры */
  color: #101012;
  text-shadow: 0 2px 0 rgba(255,255,255,0.35);
}

/* Белый круг — ВАЖНО: теперь ::before, чтобы НЕ перекрывать цифру */


.lotto-ball{
  color: #0e0e10;
}
.lotto-ball > *{ position: relative; z-index: 1; }

#lastBarrel{
  /* мы используем этот id — оставляю как есть */
}

.ball-subtitle{
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted2);
}

/* pop/drop animation on last ball (JS toggles .pop) */
#lastBarrel.pop{
  animation: ballDrop 420ms cubic-bezier(.2,.95,.2,1.05);
}
@keyframes ballDrop{
  0%   { transform: translateY(-18px) scale(0.96); filter: brightness(0.95); }
  55%  { transform: translateY(6px) scale(1.03); }
  100% { transform: translateY(0px) scale(1.00); }
}

/* ===== History ribbon ===== */
.history-wrap{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.history-title{
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 10px 2px;
}

.barrel-history{
  display:flex;
  gap: 10px;
  justify-content:flex-start;
  align-items:center;

  flex-wrap: wrap;          /* несколько рядов */
  overflow: visible;        /* НИКАКОГО внутреннего скролла */
  max-height: none;         /* убрать ограничение */

  padding: 10px 8px;
  border-radius: 18px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.08);
}


/* small “balls” in ribbon */
.barrel{
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  font-weight: 900;
  font-size: 15px;
  color: #101012;
  user-select:none;

  background:
    radial-gradient(22px 22px at 30% 25%, rgba(255,255,255,0.28), rgba(255,255,255,0) 60%),
    radial-gradient(circle at 35% 35%, #f8e2bf 0%, #e6c18a 55%, #b38149 100%);

  box-shadow:
    inset 0 0 0 4px rgba(180, 28, 45, 0.95), /* красный обод */
    inset 0 6px 10px rgba(255,255,255,0.14),
    inset 0 -10px 14px rgba(0,0,0,0.28),
    0 10px 18px rgba(0,0,0,0.35);

  border: 1px solid rgba(255,255,255,0.14);
  flex: 0 0 auto;
}


.barrel.barrel-last{
  outline: 2px solid rgba(255,255,255,0.75);
  transform: scale(1.06);
  animation: ribbonPop 260ms ease-out;
}
@keyframes ribbonPop{
  0%{ transform: scale(0.92); opacity: 0.8; }
  100%{ transform: scale(1.06); opacity: 1; }
}

/* ===== Deck (accordions) ===== */
.deck{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.deck-tabs{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.tab-btn{
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  background: rgba(0,0,0,0.25);
  border: 1px solid transparent;
}

.tab-btn .tab-meta{
  margin-left: 6px;
  font-size: 12px;
  color: var(--muted2);
}

.tab-btn.is-active{
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.2);
}

.tab-panel{
  display:none;
}

.tab-panel.is-active{
  display:block;
}

.check-panel{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

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

.check-controls input{
  width: 140px;
}

.check-result{
  font-size: 14px;
  color: var(--muted2);
}

.check-result[data-status="ok"]{
  color: #b7f7c4;
}

.check-result[data-status="warn"]{
  color: #ffd38a;
}

.check-result[data-status="error"]{
  color: #ff9ca2;
}

.panel{
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  overflow:hidden;
  box-shadow: var(--shadow);
}

.panel summary{
  list-style:none;
  cursor:pointer;
  padding: 12px 14px;
  font-weight: 800;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}
.panel summary::-webkit-details-marker{ display:none; }

.panel[open] summary{
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.10);
}

.panel-body{
  padding: 12px 12px 14px;
}

.muted{ opacity: 0.7; }

/* ===== Round panel (inside accordion) ===== */
.round-panel{
  display:flex;
  flex-direction: column;
  gap: 12px;
}

.game-panel{
  display:flex;
  flex-direction: column;
  gap: 16px;
}

.players-panel{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.round-stats{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.round-controls{
  display:flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}
.round-actions{
  display:flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ===== Players ===== */
.players-add{
  display:flex;
  gap: 10px;
  justify-content:flex-start;
  align-items:center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.players-list{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.player-row{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 12px;
  align-items:center;
  padding: 12px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
}

.player-name{
  font-weight: 800;
  font-size: 16px;
}

.player-cards{
  display:flex;
  gap: 8px;
  align-items:center;
  justify-content:center;
}

.player-cards input{
  width: 72px;
  text-align:center;
  padding: 8px 10px;
}

.player-balance{
  text-align:right;
}

.player-actions{
  display:flex;
  gap: 8px;
  justify-content:flex-end;
}

.btn-mini{
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 13px;
}

.btn-top{ background: rgba(255,255,255,0.88); color:#111; }
.btn-mid{ background: rgba(255,255,255,0.14); }
.btn-bot{ background: rgba(255,120,120,0.30); }
.btn-top:hover{ background: rgba(255,255,255,1); }
.btn-mid:hover{ background: rgba(255,255,255,0.20); }
.btn-bot:hover{ background: rgba(255,120,120,0.40); }

.player-delete{
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.12);
}
.player-delete:hover{ background: rgba(255,255,255,0.18); }

/* ===== Events ===== */
.events-list{
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.event-item{
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.08);
  line-height: 1.25;
}

/* ===== Results ===== */
.results-panel{
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
}

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

.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 16px;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.08);
}

.table th, .table td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align:left;
}

.table th{
  font-size: 13px;
  color: var(--muted);
  background: rgba(255,255,255,0.06);
}

.round-card{
  padding: 12px;
  border-radius: 16px;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.08);
  display:flex;
  flex-direction: column;
  gap: 8px;
}

.badge{
  display:inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  font-size: 12px;
  margin-right: 6px;
  margin-bottom: 6px;
}

.small-muted{
  color: var(--muted2);
  font-size: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 720px){
  .topbar{ flex-direction: column; align-items: stretch; }
  .top-actions{ justify-content: space-between; }
  .stage-head{ align-items: flex-start; flex-wrap: wrap; }
  .range{ width: 220px; }
  .lotto-ball{ width: 180px; height: 180px; font-size: 72px; }
  .player-row{ grid-template-columns: 1fr; }
  .player-balance{ text-align:left; }
  .player-actions{ justify-content:flex-start; flex-wrap: wrap; }
  .deck-tabs{ flex-direction: column; align-items: stretch; }
  .tab-btn{ justify-content: space-between; }
  .modal-card,
  .modal-card-admin{
    max-height: 88vh;
    margin: 6vh auto;
    padding: 16px;
  }
}

@media (max-width: 860px){
  .settings-grid{ grid-template-columns: 1fr; }
}

.splitwise-list{
  display:flex;
  flex-direction: column;
  gap: 8px;
}

.splitwise-item{
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 15px;
}

.splitwise-from{
  font-weight: 700;
}

.splitwise-arrow{
  opacity: 0.6;
  margin: 0 6px;
}

.splitwise-amount{
  font-weight: 800;
}
.btn-sm{
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 13px;
}

.voice-actions{
  display:flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 2px;
}

.modal.hidden{ display:none; }
.modal{
  position: fixed;
  inset: 0;
  z-index: 999;
}

.modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(2px);
}

.modal-card-admin{
  position: relative;
  width: min(720px, calc(100vw - 24px));
  margin: 40px auto;
  background: rgba(20,20,22,0.96);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 20px;
  box-shadow: 0 22px 70px rgba(0,0,0,0.55);
  overflow: hidden;
}

.modal-header, .modal-footer{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.modal-footer{
  border-bottom: 0;
  border-top: 1px solid rgba(255,255,255,0.10);
  justify-content: flex-end;
}

.modal-title{
  font-weight: 900;
}

.modal-body{
  padding: 12px 14px 14px;
}


.voice-admin-list{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.voice-pack-row{
  display:grid;
  grid-template-columns: 160px 1fr 140px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.08);
}

.voice-pack-id{
  font-weight: 800;
  opacity: 0.9;
}
/* --- Login page --- */
/* --- Login background: softer (no heavy gradient) --- */
body{
  background-attachment: fixed;
}

.login-stage{
  /* чуть меньше "светлого" ощущения */
  background: none;
}

.page{
  /* если у тебя где-то был яркий градиент на page,
     сделаем его мягче для всего сайта */
  background: radial-gradient(1200px 700px at 20% 0%, rgba(255,255,255,0.06), rgba(0,0,0,0) 55%),
              radial-gradient(900px 600px at 90% 10%, rgba(176,42,42,0.10), rgba(0,0,0,0) 60%);
}
.login-card{
  width: min(920px, 100%);
  border-radius: 24px;
  padding: 18px;
  background: rgba(20,20,22,0.55);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
}

.login-hero{
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px 10px 14px;
}

.login-ball{
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 26px;
  background: #e6e2d8;
  color: #111;
  border: 4px solid #b02a2a;
  box-shadow: 0 14px 30px rgba(0,0,0,0.35);
}

.login-title{
  font-size: 22px;
  font-weight: 900;
}

.login-sub{
  margin-top: 6px;
  opacity: 0.88;
  line-height: 1.35;
}

.login-actions{
  padding: 12px 10px 6px;
  display: grid;
  gap: 10px;
}

.login-features{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  padding: 12px 10px 8px;
}

.login-feature{
  border-radius: 18px;
  padding: 12px 12px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.08);
}

.login-feature-title{
  font-weight: 900;
  margin-bottom: 4px;
}

@media (max-width: 860px){
  .login-features{ grid-template-columns: 1fr; }
  .login-hero{ grid-template-columns: 72px 1fr; }
  .login-ball{ width: 72px; height: 72px; font-size: 22px; }
}
/* --- User menu (topbar) --- */
.user-menu{
  position: relative;
  display: flex;
  align-items: center;
}

.user-chip{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.20);
  color: inherit;
  cursor: pointer;
}

.user-chip:hover{
  background: rgba(0,0,0,0.28);
}

.avatar{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: rgba(230,226,216,0.95);
  color: #111;
  border: 2px solid rgba(176,42,42,0.85);
  overflow: hidden;
}

.avatar.big{
  width: 44px;
  height: 44px;
  border-width: 3px;
}

.avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-name{
  font-weight: 800;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chev{
  opacity: 0.8;
  margin-left: 2px;
}

.user-dropdown.hidden{ display:none; }

.user-dropdown{
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  border-radius: 18px;
  background: rgba(20,20,22,0.96);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 70px rgba(0,0,0,0.55);
  overflow: hidden;
  z-index: 50;
}

.user-dropdown-head{
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.user-dropdown-name{
  font-weight: 900;
}

.user-dropdown-actions{
  padding: 12px 12px;
  display: flex;
  justify-content: flex-end;
}
/* --- Login animated ball (centered, stable) --- */
.login-hero{
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: center;
}

.login-ball-wrap{
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

/* контейнер-анимация */
.login-ball-anim{
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  position: relative;
  animation: floatBall 3.2s ease-in-out infinite;
}

/* три слоя в одной grid-ячейке */
.login-ball-shadow,
.login-ball,
.login-ball-ring{
  grid-area: 1 / 1;
}

/* тень под шаром */
.login-ball-shadow{
  width: 96px;
  height: 18px;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  filter: blur(10px);
  opacity: 0.70;
  transform: translateY(62px); /* “под шаром” */
}

/* сам шар */
.login-ball{
  width: 150px;
  height: 150px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 40px;
  background: #e6e2d8;
  color: #111;
  border: 6px solid #b02a2a;
  box-shadow: 0 18px 38px rgba(0,0,0,0.40);
}

/* пульсирующее кольцо */
.login-ball-ring{
  width: 168px;
  height: 168px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.10);
  box-shadow: inset 0 0 0 2px rgba(176,42,42,0.12);
  animation: ringPulse 2.6s ease-in-out infinite;
}

/* анимации */
@keyframes floatBall{
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes ringPulse{
  0%,100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.04); }
}

/* адаптив */
@media (max-width: 860px){
  .login-hero{ grid-template-columns: 1fr; }
  .login-ball-wrap{ justify-content: flex-start; }
  .login-ball-anim{ width: 120px; height: 120px; }
  .login-ball{ width: 120px; height: 120px; font-size: 32px; border-width: 5px; }
  .login-ball-ring{ width: 136px; height: 136px; }
  .login-ball-shadow{ transform: translateY(52px); }
}
/* --- Google button --- */
.btn-google{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 18px;
  padding: 12px 16px;
  font-weight: 900;
  letter-spacing: 0.2px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
}

.btn-google:hover{
  background: rgba(255,255,255,0.10);
  transform: translateY(-1px);
}

.btn-google:active{
  transform: translateY(0);
}

.g-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: conic-gradient(from 180deg,
    #4285F4 0 25%,
    #34A853 25% 50%,
    #FBBC05 50% 75%,
    #EA4335 75% 100%);
  box-shadow: 0 0 0 6px rgba(255,255,255,0.06);
}
/* --- Logout button nicer --- */
.btn-logout{
  border-radius: 16px;
  padding: 10px 12px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  text-decoration: none;
}

.btn-logout:hover{
  background: rgba(255,255,255,0.10);
}
.btn-warn {
  border-color: rgba(255, 165, 0, 0.45);
  color: rgba(255, 200, 120, 0.95);
}
.btn-warn:hover { filter: brightness(1.08); }

/* ===== Penalty modal ===== */

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

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.modal-card {
  position: relative;
  max-width: 420px;
  margin: 15vh auto;
  background: #151515;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.modal-card-cards {
  max-width: min(960px, calc(100vw - 24px));
  margin: 6vh auto;
  max-height: none;
  overflow: hidden;
}

.cards-modal-frame {
  width: 100%;
  height: min(80vh, 720px);
  border: none;
  background: #111;
  border-radius: 12px;
}

.modal-card-rules {
  max-width: 620px;
  margin: 10vh auto;
}

.modal-card,
.modal-card-admin{
 /* max-height: 80vh; */
  overflow-y: auto;
}

.rules-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 20px;
}

.modal-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.penalty-options {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.btn-danger {
  background: #c0392b;
  border-color: #c0392b;
}

.btn-danger:hover {
  background: #e74c3c;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}
