/* Ataberk's 21 Master - Professional Casino Theme */
:root {
  --bg-primary: #0a0d12;
  --bg-surface: #121820;
  --bg-surface-elevated: #1a222d;
  --bg-felt-dark: #072718;
  --bg-felt: #0c3e27;
  --bg-felt-light: #125536;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(212, 175, 55, 0.35);
  --border-focus: #3b82f6;

  --gold-primary: #d4af37;
  --gold-light: #f5d77f;
  --gold-glow: rgba(212, 175, 55, 0.25);

  --text-main: #f0f4f8;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --action-hit: #f59e0b;       /* Amber */
  --action-stand: #10b981;     /* Emerald */
  --action-double: #3b82f6;    /* Blue */
  --action-split: #a855f7;     /* Purple */
  --action-surrender: #ef4444; /* Red */

  --card-bg: #ffffff;
  --card-text: #1a1a1a;
  --card-red: #dc2626;
  --card-black: #1e293b;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Cinzel', 'Playfair Display', Georgia, serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-felt: inset 0 2px 20px rgba(0, 0, 0, 0.6), 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(12, 62, 39, 0.35) 0%, transparent 70%),
    radial-gradient(circle at 100% 100%, rgba(26, 34, 45, 0.4) 0%, transparent 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #273546;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #394d65;
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1.5rem;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  text-decoration: none;
}

.brand-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #1b3d2b, #0c2016);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  box-shadow: 0 0 15px var(--gold-glow);
  color: var(--gold-light);
  font-size: 1.25rem;
  font-weight: 700;
}

.brand-title-group h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.nav-tabs {
  display: flex;
  align-items: center;
  background: rgba(18, 24, 32, 0.9);
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

.nav-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.nav-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, #1d4630, #133322);
  border: 1px solid var(--border-gold);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 12px rgba(212, 175, 55, 0.2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge-rules {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-rules strong {
  color: var(--gold-light);
}

.btn-icon {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--gold-primary);
  color: var(--gold-light);
  transform: translateY(-1px);
}

/* =========================================
   MAIN APP CONTAINER
   ========================================= */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
  width: 100%;
  flex: 1;
}

.module-section {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.module-section.active {
  display: block;
}

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

/* Felt Table Aesthetic Container */
.felt-table {
  background: radial-gradient(ellipse at 50% 40%, var(--bg-felt) 0%, var(--bg-felt-dark) 100%);
  border: 4px solid #1e2822;
  outline: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-felt);
  position: relative;
  overflow: hidden;
  padding: 2rem;
}

.felt-table::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 50%, transparent 60%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

/* Section Titles */
.section-header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* =========================================
   CARDS COMPONENT
   ========================================= */
.card-visual {
  width: 72px;
  height: 104px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px;
  font-family: var(--font-main);
  user-select: none;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #d1d5db;
}

.card-visual:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -4px rgba(0,0,0,0.6);
}

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

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

.clickable-player-card {
  cursor: pointer;
  position: relative;
}

.clickable-player-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 16px 32px -4px rgba(239, 68, 68, 0.4), 0 0 0 2px rgba(239, 68, 68, 0.6);
}

.clickable-player-card:hover::after {
  content: "✕ Remove";
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(220, 38, 38, 0.95);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.15s ease-out;
  z-index: 25;
}

.card-top-left {
  line-height: 1;
  text-align: left;
}

.card-top-left .rank {
  font-size: 1.15rem;
  font-weight: 800;
  display: block;
}

.card-top-left .suit {
  font-size: 0.85rem;
  display: block;
}

.card-center-suit {
  font-size: 1.75rem;
  text-align: center;
  line-height: 1;
  opacity: 0.95;
}

.card-bottom-right {
  line-height: 1;
  text-align: right;
  transform: rotate(180deg);
}

.card-bottom-right .rank {
  font-size: 1.15rem;
  font-weight: 800;
  display: block;
}

.card-bottom-right .suit {
  font-size: 0.85rem;
  display: block;
}

.card-back {
  background: repeating-linear-gradient(
    45deg,
    #991b1b,
    #991b1b 6px,
    #7f1d1d 6px,
    #7f1d1d 12px
  );
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-back::after {
  content: "♠♥♦♣";
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  letter-spacing: 2px;
}

/* =========================================
   LIVE HELPER MODULE
   ========================================= */
.live-helper-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.5rem;
}

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

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.felt-panel {
  background: radial-gradient(circle at 50% 30%, #0d4229, #082819);
  border: 2px solid #1a402a;
  box-shadow: var(--shadow-felt);
}

.hand-selector-block {
  margin-bottom: 1.5rem;
}

.hand-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-light);
}

.hand-label .total-badge {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-gold);
  border-radius: 9999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  color: #ffffff;
}

.cards-display-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 110px;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  overflow-x: auto;
}

.card-slot-placeholder {
  color: var(--text-subtle);
  font-size: 0.85rem;
  font-style: italic;
  margin-left: 0.5rem;
}

/* Quick Card Buttons Selector */
.card-keyboard {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 4px;
  margin-top: 0.75rem;
}

@media (max-width: 640px) {
  .card-keyboard {
    grid-template-columns: repeat(7, 1fr);
  }
}

.btn-card-key {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.5rem 0.25rem;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.btn-card-key:hover {
  background: var(--gold-primary);
  color: #000000;
  transform: translateY(-2px);
  border-color: var(--gold-light);
}

.btn-card-key.active {
  background: var(--gold-light);
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 10px var(--gold-glow);
}

/* Action Recommendation Hero */
.optimal-action-hero {
  background: linear-gradient(135deg, rgba(18, 24, 32, 0.95), rgba(12, 17, 23, 0.95));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.action-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 0.75rem;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.hero-badge-action {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.action-hit { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 2px solid #f59e0b; }
.action-stand { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 2px solid #10b981; }
.action-double { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 2px solid #3b82f6; }
.action-split { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 2px solid #a855f7; }
.action-surrender { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 2px solid #ef4444; }

.action-rationale-text {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold-primary);
}

/* Probability Meters */
.probability-meters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.meter-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.meter-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.meter-val-pct {
  font-weight: 800;
  font-size: 1.25rem;
  color: #ffffff;
}

.progress-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s ease-out;
}

.fill-safe { background: linear-gradient(90deg, #10b981, #34d399); }
.fill-warning { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.fill-danger { background: linear-gradient(90deg, #ef4444, #f87171); }

/* EV Breakdown List */
.ev-breakdown-container {
  margin-top: 1.25rem;
}

.ev-header-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--gold-light);
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.ev-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
  transition: all 0.15s;
}

.ev-action-row.is-optimal {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.4);
}

.ev-action-name {
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ev-action-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
}

.ev-value {
  font-family: monospace;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.ev-positive { color: #34d399; background: rgba(16, 185, 129, 0.1); }
.ev-negative { color: #f87171; background: rgba(239, 68, 68, 0.1); }

/* Preset buttons */
.preset-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.preset-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s;
}

.preset-pill:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

/* =========================================
   STRATEGY MATRIX MODULE
   ========================================= */
.matrix-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.75rem;
}

.legend-h { background: var(--action-hit); color: #000; }
.legend-s { background: var(--action-stand); color: #000; }
.legend-d { background: var(--action-double); color: #fff; }
.legend-p { background: var(--action-split); color: #fff; }
.legend-r { background: var(--action-surrender); color: #fff; }

.matrix-filter-tabs {
  display: flex;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 2px;
}

.matrix-filter-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.matrix-filter-btn.active {
  background: var(--gold-primary);
  color: #000000;
}

.matrix-grid-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.matrix-table-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.matrix-table-title {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.matrix-table-title h3 {
  font-size: 1.1rem;
  color: var(--gold-light);
  font-weight: 700;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 0.85rem;
}

.matrix-table th,
.matrix-table td {
  padding: 0.65rem 0.5rem;
  border: 1px solid var(--border-subtle);
  position: relative;
}

.matrix-table th {
  background: var(--bg-surface-elevated);
  color: var(--gold-light);
  font-weight: 700;
  font-size: 0.8rem;
}

.matrix-table th.col-upcard {
  min-width: 44px;
}

.matrix-table td.row-header {
  background: var(--bg-surface-elevated);
  color: #ffffff;
  font-weight: 800;
  text-align: left;
  padding-left: 1rem;
  white-space: nowrap;
}

.matrix-cell {
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.1s, filter 0.15s;
}

.matrix-cell:hover {
  transform: scale(1.15);
  z-index: 10;
  filter: brightness(1.2);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.cell-H { background: rgba(245, 158, 11, 0.85); color: #000; }
.cell-S { background: rgba(16, 185, 129, 0.85); color: #000; }
.cell-Dh, .cell-D, .cell-Ds { background: rgba(59, 130, 246, 0.85); color: #fff; }
.cell-P { background: rgba(168, 85, 247, 0.85); color: #fff; }
.cell-Rh, .cell-Rs, .cell-Rp { background: rgba(239, 68, 68, 0.85); color: #fff; }

/* Highlight Crosshairs */
.matrix-table td.highlight-row,
.matrix-table th.highlight-col {
  background-color: rgba(212, 175, 55, 0.25) !important;
}

/* =========================================
   THE EDGE TRAINER MODULE
   ========================================= */
.trainer-stage {
  max-width: 900px;
  margin: 0 auto;
}

.trainer-hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

.hud-stat-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  text-align: center;
}

.hud-stat-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.hud-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  font-family: monospace;
}

.hud-streak { color: var(--gold-light); }
.hud-best { color: #60a5fa; }
.hud-accuracy { color: #34d399; }

/* Table Scene */
.trainer-table-scene {
  background: radial-gradient(circle at 50% 30%, #0d4229, #061c12);
  border: 4px solid #1f2a24;
  border-radius: var(--radius-xl);
  outline: 1px solid var(--border-gold);
  box-shadow: var(--shadow-felt);
  padding: 2.5rem 2rem;
  position: relative;
  text-align: center;
}

.scene-dealer-section,
.scene-player-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.scene-divider {
  height: 1px;
  background: radial-gradient(ellipse at 50% 50%, rgba(212, 175, 55, 0.4), transparent 70%);
  margin: 1.75rem 0;
}

.scene-cards-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.scene-actor-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* User Decision Action Buttons */
.trainer-action-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn-trainer-action {
  min-width: 120px;
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.btn-trainer-action span.key-shortcut {
  font-size: 0.65rem;
  opacity: 0.75;
  font-weight: normal;
  text-transform: uppercase;
}

.btn-trainer-action:hover:not(:disabled) {
  transform: translateY(-3px);
  filter: brightness(1.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.btn-trainer-action:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.8);
  transform: none;
}

.btn-trainer-hit { background: var(--action-hit); color: #000; }
.btn-trainer-stand { background: var(--action-stand); color: #000; }
.btn-trainer-double { background: var(--action-double); color: #fff; }
.btn-trainer-split { background: var(--action-split); color: #fff; }
.btn-trainer-surrender { background: var(--action-surrender); color: #fff; }

/* Feedback Reveal Container */
.trainer-feedback-modal {
  display: none;
  margin-top: 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease-out;
  text-align: left;
}

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

.feedback-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.feedback-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 900;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-md);
}

.feedback-optimal {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid #10b981;
}

.feedback-mistake {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid #ef4444;
}

.btn-next-hand {
  background: linear-gradient(135deg, var(--gold-primary), #b89726);
  color: #000;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px var(--gold-glow);
}

.btn-next-hand:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
}

/* =========================================
   SETTINGS MODAL
   ========================================= */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: modalScale 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.25rem;
  color: var(--gold-light);
  font-weight: 800;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.setting-info h4 {
  font-size: 0.95rem;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.setting-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.setting-control select,
.setting-control input[type="checkbox"] {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
}

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

.modal-footer {
  padding: 1rem 1.5rem;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-modal-close {
  background: var(--gold-primary);
  color: #000;
  font-weight: 700;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-subtle);
  background: rgba(10, 13, 18, 0.9);
  margin-top: auto;
}
