/* ==========================================================================
   Ataberk's Poker Helper - Design System & Modern Casino Aesthetic
   ========================================================================== */

:root {
  /* Core Color Palette */
  --bg-primary: #080c11;
  --bg-secondary: #0e141c;
  --bg-card: #131b26;
  --bg-elevated: #1a2535;
  --bg-dock: #101722f2;

  /* Casino Felt Green */
  --felt-dark: #041a10;
  --felt-base: #072e1e;
  --felt-light: #0d4a32;
  --felt-glow: #10b981;
  --felt-border: #155e42;

  /* Metallic Champagne Gold */
  --gold-primary: #d4af37;
  --gold-light: #f5d77f;
  --gold-dark: #9a7b20;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --gold-border: rgba(212, 175, 55, 0.35);

  /* Suit Colors */
  --suit-spade: #cbd5e1;
  --suit-spade-bg: #1e293b;
  --suit-heart: #f43f5e;
  --suit-diamond: #38bdf8; /* High-contrast modern 4-color suit */
  --suit-club: #34d399;

  /* Neutrals & Text */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #38bdf8;

  /* Status Colors */
  --status-win: #10b981;
  --status-tie: #f59e0b;
  --status-loss: #ef4444;

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-brand: 'Cinzel', serif;

  /* Shadows & Glass */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.7);
  --shadow-gold: 0 0 24px rgba(212, 175, 55, 0.2);
  --shadow-felt: 0 10px 40px rgba(7, 46, 30, 0.6);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

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

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(13, 74, 50, 0.25) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(212, 175, 55, 0.05) 0%, transparent 40%),
    linear-gradient(180deg, #080c11 0%, #05080c 100%);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px 30px;
}

/* ==========================================================================
   Header & Brand
   ========================================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

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

.brand-logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px var(--gold-glow);
}

.chip-icon {
  font-size: 24px;
  color: #06090e;
  font-weight: 900;
}

.brand-title {
  font-family: var(--font-brand);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff 40%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

/* Main Navigation Tabs */
.main-tabs {
  display: flex;
  background: var(--bg-secondary);
  padding: 5px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  gap: 4px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.tab-btn.active {
  background: linear-gradient(135deg, var(--felt-light), var(--felt-base));
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.35);
  border: 1px solid var(--felt-glow);
}

.tab-pill {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  color: var(--gold-light);
}

.deck-mode-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-light);
  border: 1px solid var(--gold-border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   View Panels
   ========================================================================== */
.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

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

/* ==========================================================================
   Actual Helper (Calculator View)
   ========================================================================== */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Control Bar */
.calc-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 20px;
}

.variant-selector-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 290px;
}

.control-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 600;
}

.custom-select {
  background: var(--bg-secondary);
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  border: 1px solid var(--gold-border);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.custom-select:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 10px var(--gold-glow);
}

.variant-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
}

/* Segmented Control */
.opponents-selector-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.segmented-control {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 3px;
  border: 1px solid var(--border-subtle);
}

.segment-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.segment-btn:hover {
  color: var(--text-main);
}

.segment-btn.active {
  background: var(--bg-elevated);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* Quick Action Buttons */
.quick-action-buttons {
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: #253347;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger-soft {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger-soft:hover {
  background: rgba(239, 68, 68, 0.22);
}

/* ==========================================================================
   Poker Felt Workspace & Table Layout
   ========================================================================== */
.poker-workspace {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 1080px) {
  .poker-workspace {
    grid-template-columns: 1fr;
  }
}

.felt-table-surface {
  background: radial-gradient(ellipse at center, var(--felt-light) 0%, var(--felt-base) 55%, var(--felt-dark) 100%);
  border: 8px solid #231b12;
  box-shadow: 
    0 0 0 2px var(--gold-primary),
    inset 0 0 60px rgba(0, 0, 0, 0.85),
    var(--shadow-felt);
  border-radius: 40px;
  padding: 30px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 480px;
}

/* Status Overlay */
.felt-status-overlay {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--felt-glow);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--felt-glow);
}

.made-hand-badge {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--gold-border);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.badge-prefix {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.made-hand-badge strong {
  color: var(--gold-light);
  font-family: var(--font-display);
  font-weight: 700;
}

/* ==========================================================================
   Community Board
   ========================================================================== */
.board-container {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 26px;
}

.section-label-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold-light);
}

.board-quick-actions {
  display: flex;
  gap: 8px;
}

.btn-text-action {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-text-action:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.board-card-slots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.street-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.street-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.slots-row {
  display: flex;
  gap: 8px;
}

.street-separator {
  width: 1px;
  height: 60px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 4px;
}

/* ==========================================================================
   Card Slots (Interactive Playing Cards)
   ========================================================================== */
.card-slot {
  width: 68px;
  height: 96px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.card-slot.empty {
  border: 2px dashed rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.4);
}

.card-slot.empty:hover {
  border-color: var(--gold-light);
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.card-slot.selected-active {
  border: 2px solid var(--gold-primary) !important;
  box-shadow: 0 0 16px var(--gold-glow), inset 0 0 10px rgba(212, 175, 55, 0.2);
  transform: translateY(-3px);
  background: rgba(212, 175, 55, 0.15) !important;
}

.slot-placeholder {
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1;
}

.slot-hint {
  font-size: 0.65rem;
  font-weight: 500;
  margin-top: 2px;
}

/* Filled Card Rendering */
.card-slot.filled {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.card-slot.filled:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.card-inner {
  width: 100%;
  height: 100%;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.card-corner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.card-corner-bottom {
  align-items: flex-end;
  transform: rotate(180deg);
}

.card-rank {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
}

.card-suit-sm {
  font-size: 0.85rem;
  margin-top: -1px;
}

.card-center-suit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.2rem;
  opacity: 0.88;
}

/* Suit Colors for Rendered Cards */
.suit-s { color: #1e293b; }
.suit-h { color: var(--suit-heart); }
.suit-d { color: #0284c7; } /* Royal Blue for High-contrast clarity */
.suit-c { color: #059669; }

/* ==========================================================================
   Players Area (Hero vs Opponent)
   ========================================================================== */
.players-area {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.player-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px;
  flex: 1;
  min-width: 260px;
}

.player-box.hero-box {
  border-color: var(--gold-border);
  box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.08);
}

.player-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.hero-avatar {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
}

.opp-avatar {
  background: var(--bg-elevated);
}

.player-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.player-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
}

.player-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-clear-slot {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.btn-clear-slot:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.hero-slots-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-slots-container .card-slot.hidden {
  display: none;
}

/* Face Down Cards */
.opponent-cards-mock {
  display: flex;
  gap: 10px;
}

.card-face-down {
  width: 68px;
  height: 96px;
  border-radius: 8px;
  background: repeating-linear-gradient(
    45deg,
    #1e293b,
    #1e293b 8px,
    #0f172a 8px,
    #0f172a 16px
  );
  border: 2px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.2);
  font-size: 1.5rem;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Live Equity Dashboard
   ========================================================================== */
.equity-dashboard {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #ffffff;
}

.sim-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--felt-glow);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.equity-gauge-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.equity-gauge-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.gauge-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.equity-trend-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: var(--gold-light);
}

.equity-number-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0 16px;
}

.equity-val {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 40%, var(--felt-glow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.equity-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 4px;
}

/* Equity Bar Breakdown */
.equity-bar-track {
  height: 12px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-full);
  display: flex;
  overflow: hidden;
  margin-bottom: 16px;
}

.equity-bar-fill {
  height: 100%;
  transition: width 0.3s ease-out;
}

.hero-win-bar { background: var(--status-win); }
.hero-tie-bar { background: var(--status-tie); }
.opp-win-bar { background: var(--status-loss); }

.equity-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  text-align: left;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.legend-item strong {
  margin-left: auto;
  color: #fff;
  font-family: var(--font-mono);
}

.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.hero-dot { background: var(--status-win); }
.tie-dot { background: var(--status-tie); }
.opp-dot { background: var(--status-loss); }

/* Progress tracker */
.sim-progress-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 12px;
  border: 1px solid var(--border-subtle);
}

.sim-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--felt-glow));
  transition: width 0.15s ease-out;
}

.variant-rule-callout {
  display: flex;
  gap: 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 0.82rem;
  color: #a7f3d0;
  line-height: 1.4;
}

.callout-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Card Picker Matrix (Bottom Dock)
   ========================================================================== */
.card-picker-dock {
  padding: 20px;
  margin-top: 10px;
}

.picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.picker-title-group {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.picker-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #fff;
}

.picker-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.picker-subtitle strong {
  color: var(--gold-light);
}

.btn-secondary-compact {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-secondary-compact:hover {
  color: #fff;
  background: #233144;
}

.card-matrix-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.matrix-suit-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.matrix-suit-label {
  width: 28px;
  font-size: 1.2rem;
  font-weight: 900;
  text-align: center;
  flex-shrink: 0;
}

.matrix-cards-row {
  display: flex;
  gap: 6px;
  flex: 1;
}

.picker-card-btn {
  flex: 1;
  min-width: 44px;
  height: 52px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.picker-card-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  border-color: var(--gold-primary);
}

.picker-card-btn:disabled {
  opacity: 0.22;
  cursor: not-allowed;
  filter: grayscale(1);
  background: #334155;
  border-color: transparent;
}

.picker-card-btn.shortdeck-hidden {
  display: none;
}

.picker-card-btn .p-rank {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
}

.picker-card-btn .p-suit {
  font-size: 0.9rem;
  margin-top: 1px;
  line-height: 1;
}

/* ==========================================================================
   Learning Hub (Poker Academy) View
   ========================================================================== */
.academy-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

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

.academy-sidebar {
  padding: 24px;
  height: fit-content;
}

.sidebar-header {
  margin-bottom: 20px;
}

.sidebar-header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold-light);
  margin-bottom: 4px;
}

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

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

.lesson-nav-item {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.lesson-nav-item:hover {
  background: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.15);
}

.lesson-nav-item.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(7, 46, 30, 0.4));
  border-color: var(--felt-glow);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.15);
}

.lesson-nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.lesson-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.lesson-readtime {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.lesson-nav-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

/* Academy Article Content */
.academy-content-container {
  padding: 36px;
  line-height: 1.7;
}

.lesson-header-wrap {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.lesson-meta-chips {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.meta-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.meta-category {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  border: 1px solid var(--gold-border);
}

.meta-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--felt-glow);
}

.lesson-main-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.lesson-main-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.lesson-section {
  margin-bottom: 36px;
}

.lesson-section h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold-light);
  margin-bottom: 14px;
}

.lesson-section p {
  color: #e2e8f0;
  margin-bottom: 16px;
  font-size: 0.98rem;
}

/* Formula Box */
.formula-box {
  background: var(--bg-secondary);
  border-left: 4px solid var(--gold-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 18px 0;
}

.formula-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.formula-math {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.formula-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Rules Grid */
.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

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

.rule-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.rule-badge {
  font-size: 0.72rem;
  color: var(--felt-glow);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.rule-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

/* Custom Data Table */
.outs-cheat-table {
  overflow-x: auto;
  margin: 20px 0;
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.table-custom th, .table-custom td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.table-custom th {
  background: var(--bg-secondary);
  color: var(--gold-light);
  font-family: var(--font-display);
  font-weight: 600;
}

.table-custom tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Golden Rule Banner */
.golden-rule-banner {
  display: flex;
  gap: 16px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(16, 185, 129, 0.1));
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin: 20px 0;
}

.rule-icon {
  font-size: 2rem;
}

.rule-text {
  font-size: 0.95rem;
  color: #fff;
}

.badge-positive {
  color: var(--felt-glow);
  font-weight: 700;
}

.badge-negative {
  color: #f87171;
  font-weight: 700;
}

/* ==========================================================================
   Interactive EV Widget
   ========================================================================== */
.interactive-widget-box {
  background: var(--bg-secondary);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 28px;
  box-shadow: var(--shadow-md);
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.widget-header h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
}

.widget-badge {
  font-size: 0.7rem;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.widget-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.calc-widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-input-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.calc-input-group label strong {
  color: var(--gold-light);
  font-family: var(--font-mono);
}

.custom-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  outline: none;
}

.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
  cursor: pointer;
  transition: transform 0.1s;
}

.custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.street-pill-selector {
  display: flex;
  gap: 6px;
}

.street-pill {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.street-pill.active {
  background: var(--felt-base);
  color: #fff;
  border-color: var(--felt-glow);
}

.calc-widget-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  background: var(--bg-elevated);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.res-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.res-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.res-val {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.val-positive { color: var(--status-win); }
.val-negative { color: var(--status-loss); }

.verdict-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  text-align: center;
  width: fit-content;
}

.verdict-call {
  background: rgba(16, 185, 129, 0.2);
  color: var(--felt-glow);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.verdict-fold {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.verdict-explanation {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.2);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Interactive Table Graphic (Position Lesson)
   ========================================================================== */
.benefit-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0 24px;
}

.benefit-list li {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  color: #e2e8f0;
}

.interactive-table-wrapper {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-top: 20px;
  align-items: center;
}

@media (max-width: 900px) {
  .interactive-table-wrapper {
    grid-template-columns: 1fr;
  }
}

.poker-table-graphic {
  width: 100%;
  height: 320px;
  background: radial-gradient(ellipse at center, var(--felt-light) 0%, var(--felt-base) 60%, var(--felt-dark) 100%);
  border: 10px solid #231b12;
  border-radius: 120px;
  box-shadow: 0 0 0 2px var(--gold-primary), inset 0 0 40px rgba(0, 0, 0, 0.9);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-felt {
  text-align: center;
}

.felt-logo {
  font-family: var(--font-brand);
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.3);
}

.dealer-chip-spot {
  font-size: 0.72rem;
  color: var(--gold-light);
  margin-top: 4px;
}

/* Geometric positioning around ellipse */
.table-seat {
  position: absolute;
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
  transform: translate(-50%, -50%);
}

.table-seat:hover {
  border-color: var(--gold-light);
  transform: translate(-50%, -50%) scale(1.08);
}

.table-seat.active {
  border-color: var(--gold-primary);
  background: var(--bg-elevated);
  box-shadow: 0 0 16px var(--gold-glow);
  transform: translate(-50%, -50%) scale(1.12);
}

.table-seat .seat-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-light);
}

.table-seat .seat-name {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* 6-Max Seat Coordinates */
.seat-btn { top: 86%; left: 32%; }
.seat-sb  { top: 86%; left: 68%; }
.seat-bb  { top: 50%; left: 92%; }
.seat-utg { top: 14%; left: 68%; }
.seat-mp  { top: 14%; left: 32%; }
.seat-co  { top: 50%; left: 8%; }

/* Position Detail Card */
.position-detail-card {
  background: var(--bg-secondary);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.pos-header {
  margin-bottom: 14px;
}

.pos-title-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.pos-title-wrap h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
}

.pos-tier-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.tier-elite { background: rgba(16, 185, 129, 0.2); color: var(--felt-glow); }
.tier-strong { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.tier-neutral { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.tier-danger { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.tier-tough { background: rgba(168, 85, 247, 0.2); color: #c084fc; }

.pos-stat-chip {
  font-size: 0.78rem;
  color: var(--gold-light);
  font-family: var(--font-mono);
}

.pos-description {
  font-size: 0.88rem;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.pos-playbook strong {
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pos-playbook ul {
  margin-top: 8px;
  padding-left: 18px;
  font-size: 0.85rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ==========================================================================
   Board Textures Cards
   ========================================================================== */
.texture-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.texture-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.texture-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.texture-header h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #fff;
}

.texture-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.badge-dry { background: rgba(16, 185, 129, 0.15); color: var(--felt-glow); }
.badge-wet { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.badge-neutral { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }

.sample-board {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.mini-card {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  background: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
}

.card-black { color: #0f172a; }
.card-red { color: var(--suit-heart); }

.texture-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.texture-strategy {
  font-size: 0.82rem;
  color: #cbd5e1;
}

.texture-strategy ul {
  padding-left: 18px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Cheat Sheet Box */
.cheat-sheet-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-subtle);
}

.cheat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.cheat-label {
  font-weight: 700;
  color: var(--gold-light);
  min-width: 150px;
}

.cheat-arrow {
  color: var(--text-dim);
}

.cheat-action {
  color: #fff;
}

/* Hand Tier Grid */
.hand-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.hand-tier {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.tier-badge {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.premium-tier .tier-badge { color: var(--gold-light); }
.strong-tier .tier-badge { color: var(--felt-glow); }
.speculative-tier .tier-badge { color: #38bdf8; }
.trash-tier .tier-badge { color: #f87171; }

.tier-hands {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 8px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}

.divider {
  margin: 0 6px;
}

.engine-badge {
  font-family: var(--font-mono);
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
