/* ================================================
     BlackJack 21 - Card Counting Trainer
   Main Stylesheet
   ================================================ */

/* ---------- CSS Variables (aligned with Blackjack Training logo) ---------- */
:root {
  --green-dark: #0a1f14;
  --green-mid: #1a4d2e;
  --green-felt: #1e3d28;
  --gold: #d4af37;
  --gold-mid: #aa8431;
  --gold-light: #f5df4d;
  --gold-gradient: linear-gradient(165deg, #f5df4d 0%, #d4af37 45%, #aa8431 100%);
  --chrome: linear-gradient(180deg, #e8e8ec 0%, #a8a8b0 50%, #6a6a72 100%);
  --red-card: #c0392b;
  --black-card: #0d0d0d;
  --white: #ffffff;
  --off-white: #e8e8ea;
  --gray-light: #b0b0b8;
  --gray-mid: #8a8a94;
  --correct: #4caf50;
  --incorrect: #f44336;
  --bg-page: #000000;
  --bg-elevated: #0c0c0c;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  --radius: 12px;
  --radius-sm: 6px;
  --transition: 0.28s ease;
  --font-ui: 'Montserrat', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-badge: 'Cinzel', Georgia, serif;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background: var(--bg-page);
  background-image: radial-gradient(ellipse 120% 80% at 50% -20%, #1a1520 0%, var(--bg-page) 55%);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.6;
}

body.enter-locked {
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* The hidden attribute must win over component display rules (e.g. display:flex). */
[hidden] {
  display: none !important;
}

/* ---------- Enter site overlay ---------- */
.site-enter-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 1;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.site-enter-overlay.site-enter-exit {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-enter-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 70% at 50% 35%, #1a1528 0%, #000 55%, #000 100%);
}

.site-enter-inner {
  position: relative;
  z-index: 1;
  max-width: 520px;
  width: 100%;
  text-align: center;
}

.site-enter-logo {
  width: min(72vw, 320px);
  height: auto;
  max-height: 42vh;
  object-fit: contain;
  margin: 0 auto 8px;
  display: block;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.75));
}

/* Shown only when the logo image cannot be loaded (see initLogoFallback in script.js) */
.site-enter-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 20px;
}

.site-enter-copy {
  font-size: 0.95rem;
  color: var(--gray-light);
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
}

.site-enter-cta {
  padding: 16px 40px;
  font-size: 0.95rem;
  min-width: 220px;
}

.site-enter-hint {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--gray-mid);
  letter-spacing: 0.06em;
}

.container {
    max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ================================================
     HEADER / NAV
     ================================================ */
.header {
  background: linear-gradient(180deg, #080808 0%, #000 100%);
  border-bottom: 2px solid transparent;
  border-image: var(--gold-gradient) 1;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.85);
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 4px 0;
  max-width: min(100%, 420px);
}

.logo-brand:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.logo-mark {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.35));
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.logo-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.logo-sub {
  font-family: var(--font-badge);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-mid);
}

.nav {
  display: flex;
  gap: 8px;
}

.nav-btn {
    background: transparent;
  color: var(--gray-mid);
  border: 2px solid transparent;
  padding: 10px 22px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
    transition: all var(--transition);
}

.nav-btn:hover {
    color: var(--white);
  border-color: var(--gold);
  }

.nav-btn.active {
  background: var(--gold-gradient);
  color: #0a0a0a;
  border-color: var(--gold-light);
}

    /* ================================================
         SECTIONS
   ================================================ */
.section {
    display: none;
  padding: 48px 40px;
  animation: fadeIn 0.3s ease;
}

.section.active { display: block; }

.section > h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--off-white);
  margin-bottom: 32px;
  border-bottom: 2px solid rgba(212, 175, 55, 0.35);
  padding-bottom: 12px;
  letter-spacing: 0.02em;
    }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================
   HOME SECTION
   ================================================ */
      .welcome-container {
          text-align: center;
  max-width: 800px;
  margin: 0 auto;
    }

.welcome-container h2 {
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 700;
  color: var(--off-white);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.welcome-container > p {
          font-size: 1.1rem;
  color: var(--gray-mid);
  margin-bottom: 48px;
  line-height: 1.8;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.feature-card {
  background: linear-gradient(145deg, #111 0%, #1a2a1a 100%);
  border: 1px solid var(--green-mid);
    border-radius: var(--radius);
    padding: 32px 24px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(45,140,78,0.25);
}

.feature-card h3 {
  font-size: 1.5rem;
  color: var(--gold-light);
  margin-bottom: 12px;
}

    .feature-card p {
    color: var(--gray-mid);
  font-size: 0.95rem;
  }

/* ================================================
     BUTTONS
       ================================================ */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 30px;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.5px;
}

.btn-primary {
  background: var(--gold-gradient);
  color: #1a1508;
  border: 1px solid rgba(245, 223, 77, 0.5);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
  font-family: var(--font-badge);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.88rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(212, 175, 55, 0.45);
}

.btn-secondary {
    background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}

.btn-secondary:hover {
    background: var(--gold);
  color: #000;
}

.btn-danger {
    background: var(--red-card);
  color: var(--white);
}

.btn-danger:hover {
    background: #a93226;
      transform: translateY(-2px);
}

.btn-count {
    background: #1e3a1e;
  color: var(--white);
  border: 2px solid var(--green-mid);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  min-width: 60px;
}

.btn-count:hover {
    background: var(--green-mid);
  border-color: var(--gold);
  color: var(--gold);
  transform: scale(1.08);
}

.btn-count.correct {
  background: rgba(76, 175, 80, 0.15);
  border-color: var(--correct);
  color: var(--correct);
}

.btn-count.wrong {
  background: rgba(244, 67, 54, 0.12);
  border-color: var(--incorrect);
  color: var(--incorrect);
}

/* ================================================
     LESSONS SECTION
     ================================================ */
.lessons-container {
    display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  }

.lesson-card {
    background: linear-gradient(145deg, #111 0%, #1a2a1a 100%);
  border: 1px solid var(--green-mid);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.lesson-card:hover {
    transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.lesson-header {
    background: var(--green-dark);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.lesson-header h3 {
    font-size: 1.15rem;
  color: var(--white);
}

.difficulty {
    padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
    letter-spacing: 1px;
  }

.lesson-card:nth-child(1) .difficulty { background: #1b5e20; color: #81c784; }
.lesson-card:nth-child(2) .difficulty { background: #e65100; color: #ffcc80; }
.lesson-card:nth-child(3) .difficulty { background: #4a148c; color: #ce93d8; }

.lesson-content {
    padding: 24px;
                                      }

.lesson-content > p {
    color: var(--gray-mid);
  margin-bottom: 20px;
  font-size: 0.95rem;
                                      }

/* Card Values Table */
.card-values {
    background: #0a1a0a;
  border: 1px solid #2d4a2d;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.value-row {
    display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #1a2d1a;
}

.value-row:last-child { border-bottom: none; }

  .value-row .cards {
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
}

.value-row .value {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
  min-width: 50px;
  text-align: center;
}

/* Color-code count values */
.value-row:has(.value:not(:empty)) .value {
    background: #1a2d1a;
}

/* ================================================
   PRACTICE SECTION
     ================================================ */
.practice-container {
    display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Controls Bar */
.game-controls {
    background: #111;
  border: 1px solid var(--green-mid);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.control-group {
    display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-group label {
    font-size: 0.85rem;
      color: var(--gray-mid);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.control-group select {
    background: #1a1a1a;
  color: var(--white);
  border: 2px solid var(--green-mid);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  cursor: pointer;
  min-width: 160px;
  outline: none;
  transition: border-color var(--transition);
}

.control-group select:focus {
    border-color: var(--gold);
}

/* Game Area */
.game-area {
    background: radial-gradient(ellipse at center, var(--green-felt) 0%, var(--green-dark) 70%, #0a1a0a 100%);
  border: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.4), var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Live Count HUD */
.game-header {
    display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  }

.game-stat {
    background: rgba(0,0,0,0.5);
  border: 1px solid rgba(201,162,39,0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-align: center;
}

.game-stat .label {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.game-stat .value {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gold-light);
}

.card-display {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.dealer-section,
.player-section {
  text-align: center;
  min-width: 140px;
}

.dealer-section h4,
.player-section h4 {
  font-size: 0.85rem;
  color: var(--gray-mid);
  margin-bottom: 8px;
}

.dealer-cards,
.player-cards {
  min-height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dealer-value,
.player-value {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--off-white);
}

.counting-area {
  text-align: center;
  padding: 16px 0;
}

.current-card-display {
  min-height: 160px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.card-prompt {
  color: var(--gray-mid);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.counting-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.playing-card {
  width: 100px;
  height: 140px;
  background: linear-gradient(180deg, #fff 0%, #f0f0f0 100%);
  border: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: var(--shadow);
}

.playing-card.red {
  color: var(--red-card);
}

.playing-card.black {
  color: var(--black-card);
}

.playing-card .rank {
  font-size: 1.75rem;
  font-weight: 800;
}

.playing-card .suit {
  font-size: 2rem;
  line-height: 1;
}

.feedback-area {
  min-height: 2.5rem;
  margin: 8px 0;
}

.feedback-area .feedback-message {
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.feedback-area .feedback-message.correct {
  background: rgba(76, 175, 80, 0.12);
  color: var(--correct);
  border: 1px solid rgba(76, 175, 80, 0.55);
}

.feedback-area .feedback-message.wrong {
  background: rgba(244, 67, 54, 0.1);
  color: #ef9a9a;
  border: 1px solid rgba(244, 67, 54, 0.5);
}

.feedback-area .feedback-message.push {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.5);
}

.session-stats {
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}

.session-stats h4 {
  text-align: center;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.session-stats .stat {
  text-align: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
}

.session-stats .stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.session-stats .stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}

/* Statistics section */
.stats-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.stats-card {
  background: #111;
  border: 1px solid var(--green-mid);
  border-radius: var(--radius);
  padding: 24px;
}

.stats-card h3 {
  margin-bottom: 16px;
  color: var(--gold);
  font-size: 1.1rem;
}

.stats-display {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.big-stat {
  text-align: center;
  padding: 16px;
  background: #0a1a0a;
  border-radius: var(--radius-sm);
}

.big-stat .label {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-mid);
  margin-bottom: 8px;
}

.big-stat .number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gold-light);
}

.system-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.system-stat-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: #0a1a0a;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.system-name {
  font-weight: 700;
  color: var(--white);
}

.system-count,
.system-accuracy {
  color: var(--gray-mid);
  font-size: 0.88rem;
}

.recent-sessions .no-data {
  color: var(--gray-mid);
  text-align: center;
  padding: 16px;
}

.recent-session-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #1a2d1a;
  font-size: 0.88rem;
}

.recent-session-row:last-child {
  border-bottom: none;
}

.rs-time {
  color: var(--gray-mid);
}

.rs-sys {
  color: var(--white);
  font-weight: 600;
}

.rs-acc {
  color: var(--gold-light);
  font-weight: 700;
}

.progress-chart {
  min-height: 180px;
}

.progress-chart canvas {
  display: block;
  width: 100%;
  border-radius: var(--radius-sm);
}

.stats-actions {
  text-align: center;
  padding: 8px 0 24px;
}

.btn-danger {
  background: #6a1b1b;
  border: 2px solid #c62828;
  color: #ffcdd2;
}

.btn-danger:hover {
  background: #8e1f1f;
  border-color: #ef5350;
}

.footer {
  text-align: center;
  padding: 32px 16px;
  color: var(--gray-mid);
  font-size: 0.85rem;
}

.footer p {
  margin: 6px 0;
}

@media (max-width: 600px) {
  /* Keep all five nav items on screen: wrap them instead of overflowing the page. */
  .header {
    padding: 12px 16px;
    gap: 10px;
  }

  .nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .nav-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .system-stat-row,
  .recent-session-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .playing-card {
    width: 88px;
    height: 124px;
  }

  .logo-mark {
    width: 52px;
    height: 52px;
  }

  .logo-title {
    font-size: 1.1rem;
  }

  .logo-sub {
    font-size: 0.55rem;
    letter-spacing: 0.2em;
  }

  .site-enter-copy {
    font-size: 0.88rem;
  }
}

/* ---------- Live Play session ---------- */
.section-live .live-section-head {
  margin-bottom: 24px;
}

.section-live h2 {
  margin-bottom: 12px;
}

.live-intro {
  color: var(--gray-light);
  max-width: 52rem;
  line-height: 1.65;
  font-size: 0.98rem;
}

.live-intro strong {
  color: var(--off-white);
}

.live-setup-card {
  background: var(--bg-elevated);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius);
  padding: 28px 28px 32px;
  max-width: 560px;
  box-shadow: var(--shadow);
}

.live-setup-title {
  font-family: var(--font-badge);
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-mid);
  margin-bottom: 14px;
}

.live-setup-steps {
  margin: 0 0 22px 1.1rem;
  color: var(--gray-light);
  font-size: 0.92rem;
  line-height: 1.65;
}

.live-setup-steps li {
  margin-bottom: 8px;
}

.live-setup-card .live-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.live-setup-card .control-group label {
  font-size: 0.8rem;
}

.live-start-cta {
  width: 100%;
  padding: 16px 24px;
  font-size: 0.85rem;
}

.live-session {
  margin-top: 8px;
}

.live-session-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 900px) {
  .live-session-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
    gap: 24px;
  }
}

.live-sidebar {
  background: linear-gradient(165deg, #111 0%, #060606 100%);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.live-timer-box {
  background: rgba(60, 35, 0, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
}

.live-timer-box .label {
  display: block;
  font-size: 0.68rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.live-timer-box .value {
  font-family: var(--font-ui);
  font-size: 1.65rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--gold-light);
  line-height: 1.1;
}

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

.live-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.live-stat-label {
  font-size: 0.72rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.live-stat-value {
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--off-white);
}

.live-btn-end {
  width: 100%;
  margin-top: 4px;
  font-size: 0.78rem;
  padding: 10px 12px;
}

.live-main {
  min-width: 0;
}

.live-bet-hint {
  font-size: 0.9rem;
  color: var(--gray-light);
  margin-bottom: 14px;
  padding: 10px 14px;
  background: rgba(212, 175, 55, 0.06);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold-mid);
}

.live-bet-panel {
  background: var(--bg-elevated);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  margin-bottom: 16px;
}

.live-bet-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.live-bet-row--match .live-bet-pill--suggested,
.live-bet-row--match .live-bet-pill--yours {
  border-color: rgba(76, 175, 80, 0.55);
  box-shadow: 0 0 0 1px rgba(76, 175, 80, 0.25);
}

.live-bet-row--miss .live-bet-pill--yours {
  border-color: rgba(244, 67, 54, 0.35);
}

.live-bet-pill {
  flex: 1;
  min-width: 140px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
}

.live-bet-pill-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-mid);
  margin-bottom: 4px;
}

.live-bet-pill-value {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--gold-light);
}

.live-bet-caption {
  font-size: 0.78rem;
  color: var(--gray-mid);
  margin-bottom: 14px;
  line-height: 1.45;
}

.live-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}

.live-chip {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  background: radial-gradient(circle at 30% 28%, #3d5c48 0%, #1a2e22 55%, #0d1812 100%);
  color: var(--off-white);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.live-chip:hover {
  transform: translateY(-2px) scale(1.05);
  border-color: rgba(212, 175, 55, 0.6);
}

.live-chip-selected {
  border-color: var(--gold-light) !important;
  color: var(--gold-light) !important;
  box-shadow:
    0 0 0 2px rgba(212, 175, 55, 0.45),
    0 6px 18px rgba(0, 0, 0, 0.5);
  background: radial-gradient(circle at 30% 28%, #5a4828 0%, #2a2310 60%, #1a1508 100%);
}

.live-deal-wide {
  width: 100%;
  padding: 14px 20px;
}

.live-game-area {
  margin-bottom: 12px;
}

.live-felt {
  background:
    radial-gradient(ellipse 80% 90% at 50% 20%, rgba(45, 95, 58, 0.35) 0%, transparent 55%),
    linear-gradient(155deg, #142b1f 0%, #0d1a12 45%, #081208 100%);
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius);
  padding: 22px 18px 26px;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.5), 0 12px 40px rgba(0, 0, 0, 0.45);
}

.live-felt-zone {
  text-align: center;
}

.live-felt-label {
  display: block;
  font-family: var(--font-badge);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(245, 223, 77, 0.75);
  margin-bottom: 12px;
}

.live-felt-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.35), transparent);
  margin: 20px 0;
}

.live-felt-zone--dealer .live-cards {
  min-height: 132px;
}

.live-player-hands {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: flex-start;
}

.live-player-hands .live-hand-block {
  flex: 1 1 200px;
  max-width: 100%;
}

.live-cards {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
}

.live-hand-block h4 {
  font-size: 0.8rem;
  color: var(--gray-mid);
  margin-bottom: 8px;
}

.live-hand-active {
  outline: 2px solid var(--gold);
  outline-offset: 6px;
  border-radius: var(--radius-sm);
  padding: 10px;
  background: rgba(0, 0, 0, 0.25);
}

.live-hand-total {
  margin-top: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--off-white);
}

.live-actions {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.live-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.live-actions-main {
  gap: 12px;
}

.live-action-btn {
  flex: 1;
  min-width: 120px;
  padding: 14px 20px;
  font-size: 1.02rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.live-action-hit {
  background: linear-gradient(165deg, #2e5c3e 0%, #1a3d28 100%);
  color: #e8f5e9;
  border: 2px solid rgba(129, 199, 132, 0.45);
}

.live-action-hit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(46, 92, 62, 0.45);
}

.live-action-stand {
  background: linear-gradient(165deg, #4a4030 0%, #2a2418 100%);
  color: var(--gold-light);
  border: 2px solid rgba(212, 175, 55, 0.45);
}

.live-action-stand:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(74, 64, 48, 0.45);
}

.live-action-2nd {
  flex: 1;
  min-width: 100px;
  padding: 10px 14px;
  font-size: 0.88rem;
}

.live-actions .btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
}

.live-phase-msg {
  text-align: center;
  color: var(--gold-mid);
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 600;
}

.live-feedback-box {
  min-height: 3rem;
  margin-top: 8px;
}

.hidden-card {
  background: linear-gradient(145deg, #1e2a5c 0%, #0d1638 100%);
  color: var(--off-white);
  font-size: 1.75rem;
  font-weight: 800;
  border: 2px solid rgba(120, 140, 200, 0.4);
}

.live-results {
  background: var(--bg-elevated);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 20px;
  box-shadow: var(--shadow);
}

.live-results h3 {
  font-family: var(--font-display);
  color: var(--off-white);
  margin-bottom: 16px;
  font-size: 1.35rem;
}

.live-result-lede {
  margin-bottom: 12px;
  color: var(--gray-light);
}

.live-result-stats {
  margin: 0 0 16px 18px;
  color: var(--gray-mid);
  line-height: 1.65;
}

.live-result-stats strong {
  color: var(--off-white);
}

.live-misplay-list {
  margin: 8px 0 16px 18px;
  color: var(--gray-mid);
  font-size: 0.92rem;
  line-height: 1.55;
}

.live-result-tip {
  font-size: 0.88rem;
  color: var(--gray-mid);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  padding-top: 14px;
  margin-top: 14px;
  line-height: 1.55;
}

@media (max-width: 899px) {
  .live-sidebar {
    order: -1;
  }

  .live-stat-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .live-btn-end {
    order: 10;
  }
}
