/* Live & Games page styles — AfterHoursIRL */

.live-page {
  padding: 120px 0 60px;
  min-height: 100vh;
}

.live-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

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

.live-panel {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(var(--glass-blur));
}

.live-panel + .live-panel {
  margin-top: 16px;
}

.live-panel h2 {
  font-size: 0.8rem;
  margin-bottom: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

/* Compact Kick button lives in page-head (see style.css .btn-kick) */
.live-stream-cta {
  display: none;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.live-badge.offline {
  color: var(--text-dim);
}

.live-badge.offline::before {
  box-shadow: none;
}

/* Points card */
.points-card {
  text-align: center;
  padding: 24px;
}

.points-card .points-value {
  font-size: 3rem;
  font-weight: 700;
  color: var(--pink);
  line-height: 1;
}

.points-card .points-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Games list */
.games-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.game-card {
  display: block;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
}

.game-card h3 {
  color: var(--pink);
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.game-card .game-cost {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Leaderboard */
.leaderboard {
  list-style: none;
}

.leaderboard li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.leaderboard li:last-child {
  border-bottom: 0;
}

.leaderboard .rank {
  width: 28px;
  flex-shrink: 0;
  font-weight: 700;
  color: var(--pink);
}

.lb-avatar {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  background: var(--surface-solid);
}

.lb-avatar-fallback {
  object-fit: contain;
  padding: 3px;
}

.leaderboard .username {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard .points {
  font-weight: 600;
  color: var(--pink);
  flex-shrink: 0;
}

/* Earn guide */
.earn-tiers {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.earn-tier {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: 1px solid var(--border);
}

.earn-tier-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.earn-tier-amount {
  font-size: 0.8rem;
  color: var(--pink);
  font-weight: 600;
}

.earn-tier-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Activity feed */
.activity-feed {
  list-style: none;
  max-height: 400px;
  overflow-y: auto;
}

.activity-feed li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.activity-feed li:last-child {
  border-bottom: 0;
}

.activity-type {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
}

.activity-type.win {
  color: var(--green);
  background: rgba(0, 230, 118, 0.1);
}

.activity-type.loss {
  color: var(--red);
  background: rgba(255, 82, 82, 0.1);
}

.activity-type.info {
  color: var(--text-muted);
  background: var(--glass-bg);
}

.activity-amount {
  font-weight: 600;
  margin-left: auto;
}

.activity-amount.positive {
  color: var(--green);
}

.activity-amount.negative {
  color: var(--red);
}

/* ============================================================
   Game-specific styles
   ============================================================ */

.game-page {
  padding: 120px 0 60px;
  min-height: 100vh;
}

.game-container {
  max-width: 920px;
  margin: 0 auto;
}

.game-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.game-header h1 {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--white), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-balance {
  font-size: 1.1rem;
  font-weight: 600;
}

.game-balance .balance-value {
  color: var(--pink);
}

/* Bet controls (shared) */
.bet-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.bet-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bet-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  text-align: center;
}

.bet-input:focus {
  outline: none;
  border-color: var(--pink);
}

.bet-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.bet-quick button {
  padding: 10px 6px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
}

.bet-quick button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Shared game shell layout (board + controls) */
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 820px) {
  .game-layout {
    grid-template-columns: 1fr;
  }
}

.game-board {
  min-width: 0;
}

.game-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.game-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.game-option-row {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.game-option-row.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.game-option-row.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

.game-option-btn {
  padding: 10px 6px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-transform: capitalize;
}

.game-option-btn.active {
  background: var(--pink);
  color: var(--white);
  border-color: var(--pink);
}

.game-option-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.game-actions {
  display: grid;
  gap: 8px;
}

.game-hint {
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0;
  color: var(--text-muted);
}

.control-block.is-locked {
  opacity: 0.55;
  pointer-events: none;
}

/* ============================================================
   Plinko
   ============================================================ */

.plinko-board {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: #1a1a1d;
  border: 1px solid var(--border);
  padding: 10px;
  overflow: hidden;
}

.plinko-canvas {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: auto;
}

.plinko-select {
  width: 100%;
  margin-bottom: 4px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 11px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.plinko-auto-row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 8px;
  align-items: end;
}

.plinko-bps .form-input {
  text-align: center;
  padding: 10px 8px;
  font-weight: 700;
}

.plinko-result {
  text-align: center;
  margin-top: 16px;
  min-height: 2em;
  font-size: 1.05rem;
  font-weight: 600;
}

/* ============================================================
   Blackjack — immersive multi-seat table
   ============================================================ */

.bj-page .bg-layer {
  filter: saturate(0.85) brightness(0.55);
}

.bj-container {
  max-width: 1180px;
}

.bj-topbar {
  margin-bottom: 14px;
}

.bj-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.bj-table-wrap {
  min-width: 0;
}

.bj-table-rail {
  border-radius: 28px;
  padding: 14px;
  background:
    linear-gradient(145deg, #5a3418 0%, #3a2010 35%, #6b3a18 70%, #2a160c 100%);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 220, 160, 0.25),
    inset 0 -2px 8px rgba(0, 0, 0, 0.45);
}

.bj-table-felt {
  position: relative;
  min-height: 640px;
  border-radius: 120px 120px 40px 40px / 70px 70px 28px 28px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(60, 140, 70, 0.55), transparent 48%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.35), transparent 55%),
    linear-gradient(180deg, #0f5a2a 0%, #0a4722 40%, #08391c 100%);
  border: 2px solid rgba(214, 176, 90, 0.35);
  box-shadow:
    inset 0 0 0 10px rgba(8, 50, 24, 0.55),
    inset 0 0 80px rgba(0, 0, 0, 0.35);
  padding: 18px 18px 22px;
}

.bj-felt-grain {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    radial-gradient(rgba(0, 0, 0, 0.45) 0.6px, transparent 0.7px);
  background-size: 3px 3px;
  mix-blend-mode: multiply;
}

.bj-felt-inlay {
  pointer-events: none;
  position: absolute;
  left: 8%;
  right: 8%;
  top: 12%;
  bottom: 10%;
  border: 2px solid rgba(214, 176, 90, 0.28);
  border-radius: 110px 110px 36px 36px / 58px 58px 22px 22px;
}

.bj-felt-brand {
  position: absolute;
  left: 50%;
  top: 30%;
  transform: translate(-50%, -50%);
  text-align: center;
  opacity: 0.55;
  pointer-events: none;
  z-index: 1;
}

.bj-brand-crown {
  width: 42px;
  height: 42px;
  display: block;
  margin: 0 auto 6px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
  opacity: 0.85;
}

.bj-brand-text {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  color: rgba(232, 205, 120, 0.85);
}

.bj-brand-rule {
  display: block;
  margin-top: 6px;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: rgba(214, 176, 90, 0.7);
  text-transform: uppercase;
}

.bj-dealer {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  min-height: 130px;
}

.bj-shoe {
  position: absolute;
  right: 8%;
  top: 18px;
  width: 54px;
  height: 76px;
  opacity: 0.9;
}

.bj-shoe-card {
  position: absolute;
  inset: 0;
  box-shadow: 0 6px 14px rgba(0,0,0,0.4) !important;
}

.bj-shoe-card:nth-child(2) {
  transform: translate(3px, -3px) rotate(2deg);
  opacity: 0.92;
}

.bj-seat-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 245, 220, 0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.bj-seat-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 205, 120, 0.95);
}

.bj-seat-value {
  min-width: 34px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(214, 176, 90, 0.35);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bj-seats {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: 34%;
  bottom: 1%;
  pointer-events: none;
}

.bj-seat {
  --seat-rot: 0deg;
  position: absolute;
  width: 148px;
  transform: translate(-50%, -55%) rotate(var(--seat-rot));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 168px;
  padding: 8px 6px 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.28));
  border: 1px solid rgba(214, 176, 90, 0.18);
  transition: border-color 0.2s, box-shadow 0.2s, filter 0.2s;
  pointer-events: auto;
}

/* Counter-rotate contents so cards stay upright while seats sit on the arc */
.bj-seat > * {
  transform: rotate(calc(var(--seat-rot) * -1));
}

.bj-seat.active {
  border-color: rgba(156, 249, 0, 0.65);
  box-shadow: 0 0 0 1px rgba(156, 249, 0, 0.3), 0 12px 30px rgba(0,0,0,0.35);
  filter: brightness(1.08);
}

.bj-seat.yours {
  border-color: rgba(248, 2, 250, 0.5);
  box-shadow: 0 0 0 1px rgba(248, 2, 250, 0.22), 0 12px 30px rgba(0,0,0,0.3);
}

.bj-seat.inactive {
  opacity: 0.38;
}

.bj-seat.inactive .bj-cards {
  min-height: 78px;
}

.bj-chip {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: #111;
  background:
    radial-gradient(circle at 35% 30%, #fff 0 8%, transparent 9%),
    conic-gradient(from 0deg, #fefefe 0 18deg, #f802fa 18deg 36deg, #fefefe 36deg 54deg, #9cf900 54deg 72deg, #fefefe 72deg 90deg, #f802fa 90deg 108deg, #fefefe 108deg 126deg, #9cf900 126deg 144deg, #fefefe 144deg 162deg, #f802fa 162deg 180deg, #fefefe 180deg 198deg, #9cf900 198deg 216deg, #fefefe 216deg 234deg, #f802fa 234deg 252deg, #fefefe 252deg 270deg, #9cf900 270deg 288deg, #fefefe 288deg 306deg, #f802fa 306deg 324deg, #fefefe 324deg 342deg, #9cf900 342deg 360deg);
  box-shadow: 0 4px 10px rgba(0,0,0,0.35), inset 0 0 0 4px #111, inset 0 0 0 6px #fefefe;
}

.bj-chip.empty {
  opacity: 0.25;
  filter: grayscale(0.4);
}

.bj-cards {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 96px;
  width: 100%;
  gap: 6px; /* cards do NOT overlap across seats or within a hand */
  padding: 0 2px;
}

.bj-card {
  --card-w: 58px;
  --card-h: 82px;
  position: relative;
  width: var(--card-w);
  height: var(--card-h);
  margin-left: 0;
  border-radius: 8px;
  background: linear-gradient(165deg, #ffffff 0%, #f3f3f6 55%, #e8e8ee 100%);
  border: 1px solid rgba(20, 20, 28, 0.14);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.28),
    0 1px 0 rgba(255,255,255,0.9) inset;
  color: #14141a;
  overflow: hidden;
  transform: translateY(0) rotate(var(--tilt, 0deg));
  animation: bjDeal 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
  flex: 0 0 auto;
}

.bj-dealer .bj-cards {
  gap: 8px;
}

/* Slight overlap only when a single hand gets long (3+ cards) */
.bj-cards .bj-card:nth-child(n+4) {
  margin-left: -10px;
}

.bj-card.red {
  color: #d3122b;
}

.bj-card.black {
  color: #121218;
}

.bj-card-face {
  position: absolute;
  inset: 0;
  padding: 6px 7px;
  display: flex;
  flex-direction: column;
}

.bj-card-corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  width: 18px;
}

.bj-card-corner.bottom {
  margin-top: auto;
  align-self: flex-end;
  transform: rotate(180deg);
}

.bj-card-rank {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.bj-card-suit-sm,
.bj-card-suit-lg {
  display: block;
  width: 12px;
  height: 12px;
  margin-top: 1px;
}

.bj-card-suit-lg {
  width: 26px;
  height: 26px;
  margin: auto;
}

.bj-card-suit-sm img,
.bj-card-suit-lg img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.bj-card.red .bj-card-suit-sm,
.bj-card.red .bj-card-suit-lg {
  color: #d3122b;
  filter: none;
}

.bj-card.black .bj-card-suit-sm,
.bj-card.black .bj-card-suit-lg {
  color: #121218;
}

.bj-card.back {
  background:
    radial-gradient(circle at 50% 45%, rgba(254,254,254,0.12), transparent 42%),
    linear-gradient(145deg, #5b0a67 0%, #2a0533 45%, #7a0d8a 100%);
  border-color: rgba(255, 180, 255, 0.25);
  color: #fefefe;
}

.bj-card.back::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 5px;
  border: 1px solid rgba(254, 254, 254, 0.22);
  background:
    repeating-linear-gradient(
      45deg,
      rgba(248, 2, 250, 0.16) 0 6px,
      rgba(156, 249, 0, 0.08) 6px 12px
    );
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25);
}

.bj-card.back::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  background: url("/assets/games/afterhours-crown.svg") center / contain no-repeat;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45));
  z-index: 1;
}

.bj-card-label {
  font-size: 0.68rem;
  color: rgba(255, 245, 220, 0.78);
  text-align: center;
  min-height: 1em;
}

.bj-result {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 3;
  min-width: min(420px, 80%);
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fefefe;
  text-shadow: 0 2px 10px rgba(0,0,0,0.55);
  pointer-events: none;
}

.bj-panel {
  padding: 16px;
  position: sticky;
  top: 76px;
}

.bj-seat-toggles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.bj-seat-toggle {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.bj-seat-toggle.active {
  border-color: var(--purple);
  background: rgba(248, 2, 250, 0.12);
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgba(248, 2, 250, 0.25);
}

.bj-btn-secondary {
  background: var(--surface-solid);
  color: var(--text);
  border-color: var(--border-strong);
}

.bj-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@keyframes bjDeal {
  0% {
    opacity: 0;
    transform: translateY(-28px) scale(0.92) rotate(var(--tilt, 0deg));
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(var(--tilt, 0deg));
  }
}

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

  .bj-panel {
    position: static;
  }

  .bj-table-felt {
    min-height: 600px;
    border-radius: 80px 80px 28px 28px / 48px 48px 20px 20px;
  }

  .bj-seat {
    width: 128px;
    min-height: 150px;
  }

  .bj-card {
    --card-w: 50px;
    --card-h: 72px;
  }
}

@media (max-width: 640px) {
  .bj-table-rail {
    padding: 10px;
    border-radius: 20px;
  }

  .bj-table-felt {
    min-height: 560px;
    border-radius: 28px;
    padding-bottom: 48px;
  }

  .bj-seat {
    width: 104px;
    min-height: 136px;
    padding: 6px 4px 8px;
  }

  .bj-card {
    --card-w: 42px;
    --card-h: 60px;
  }

  .bj-cards {
    gap: 4px;
    min-height: 72px;
  }

  .bj-card-rank {
    font-size: 0.78rem;
  }

  .bj-card-suit-lg {
    width: 18px;
    height: 18px;
  }
}

/* ============================================================
   Crash
   ============================================================ */

.crash-display {
  text-align: center;
  padding: 28px 18px 16px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(156, 249, 0, 0.08), transparent 55%),
    rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
  border-radius: 2px;
  margin-bottom: 12px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.crash-display.is-rising {
  border-color: rgba(156, 249, 0, 0.35);
  background:
    radial-gradient(ellipse at 50% 10%, rgba(156, 249, 0, 0.14), transparent 55%),
    rgba(0, 0, 0, 0.45);
}

.crash-display.is-crashed {
  border-color: rgba(239, 68, 68, 0.4);
  background:
    radial-gradient(ellipse at 50% 20%, rgba(239, 68, 68, 0.16), transparent 55%),
    rgba(0, 0, 0, 0.5);
}

.crash-display.is-cashed {
  border-color: rgba(156, 249, 0, 0.4);
  background:
    radial-gradient(ellipse at 50% 10%, rgba(156, 249, 0, 0.18), transparent 55%),
    rgba(0, 0, 0, 0.45);
}

.crash-multiplier {
  font-size: clamp(2.6rem, 8vw, 4rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.08);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.crash-display.is-rising .crash-multiplier {
  color: #9cf900;
  text-shadow: 0 0 28px rgba(156, 249, 0, 0.35);
}

.crash-multiplier.crashed,
.crash-display.is-crashed .crash-multiplier {
  color: #ef4444;
  text-shadow: 0 0 28px rgba(239, 68, 68, 0.4);
  animation: crash-shake 0.35s ease;
}

.crash-multiplier.cashed,
.crash-display.is-cashed .crash-multiplier {
  color: #9cf900;
  text-shadow: 0 0 28px rgba(156, 249, 0, 0.45);
}

@keyframes crash-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.crash-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 10px;
  min-height: 1.2em;
}

.crash-display.is-rising .crash-status { color: rgba(156, 249, 0, 0.9); }
.crash-display.is-crashed .crash-status { color: rgba(239, 68, 68, 0.95); }
.crash-display.is-cashed .crash-status { color: rgba(156, 249, 0, 0.95); }

.crash-chart {
  width: 100%;
  max-width: none;
  height: 180px;
  margin-top: 14px;
  display: block;
}

/* Recent plays feed under each game */
.game-history {
  margin-top: 16px;
  padding: 14px 16px;
}

.game-history-head {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.game-history-empty {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.game-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.game-history-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.game-history-item:last-child {
  border-bottom: 0;
}

.game-history-item .gh-user {
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.game-history-item .gh-result {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.game-history-item.win .gh-result,
.game-history-item.win .gh-amount {
  color: var(--green);
}

.game-history-item.loss .gh-result,
.game-history-item.loss .gh-amount {
  color: var(--red);
}

.game-history-item .gh-amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 3.5em;
  text-align: right;
}

@keyframes ghSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
  }
  60% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    max-height: 60px;
  }
}

.game-history-item.gh-slide-in {
  animation: ghSlideIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow: hidden;
}

/* ============================================================
   Mines
   ============================================================ */

.mines-board {
  min-width: 0;
}

.mines-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.mines-tile {
  aspect-ratio: 1;
  width: 100%;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  font-family: inherit;
  padding: 0;
  user-select: none;
}

.mines-tile.preview {
  cursor: default;
  opacity: 0.85;
  background: rgba(248, 2, 250, 0.04);
}

.mines-tile.revealed {
  cursor: default;
}

.mines-tile.gem {
  background: rgba(156, 249, 0, 0.18);
  border-color: var(--green);
  color: var(--green);
}

.mines-tile.mine {
  background: rgba(239, 68, 68, 0.18);
  border-color: var(--red);
  color: var(--red);
}

.mines-icon {
  width: 62%;
  height: 62%;
  display: block;
  pointer-events: none;
}

.mines-tile.disabled,
.mines-tile:disabled {
  cursor: not-allowed;
}

.mines-tile.preview:disabled {
  opacity: 0.85;
  cursor: default;
}

.mines-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.mines-info strong {
  color: var(--text);
}

.mines-multiplier {
  font-weight: 700;
  color: var(--pink);
  font-size: 1.15rem;
}

.btn-game {
  width: 100%;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 12px 16px;
}

.btn-game:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

.btn-game-primary {
  background: var(--pink);
  color: var(--white);
  border-color: var(--pink);
}

.btn-game-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn-game-cashout {
  background: var(--green);
  color: #0a0a0a;
  border-color: var(--green);
}

.btn-game-cashout:hover:not(:disabled) {
  filter: brightness(1.08);
}

/* Game result message */
.game-result {
  text-align: center;
  margin-top: 14px;
  min-height: 1.4em;
  font-size: 0.95rem;
  font-weight: 600;
}

.game-result.win {
  color: var(--green);
}

.game-result.loss {
  color: var(--red);
}

/* Shared play button (other games) */
.play-button {
  background: var(--pink);
  color: var(--white);
  border: 1px solid var(--pink);
  padding: 14px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
}

.play-button:hover:not(:disabled) {
  filter: brightness(1.06);
}

.play-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.play-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Commands reference table */
.commands-table {
  width: 100%;
  border-collapse: collapse;
}

.commands-table th,
.commands-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.commands-table th {
  color: var(--pink);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.commands-table code {
  background: var(--glass-bg);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--pink-glow);
}
