/* ==========================================================================
   RACK UP Design System
   Based on RackUp Brand Guidelines v2
   ========================================================================== */

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */
:root {
  /* ---- Brand Colors ---- */
  /* Primary Background - The bar at night */
  --color-navy: #0D1B2A;
  --color-slate: #1B2838;

  /* Primary Accent - The playing surface */
  --color-felt: #2E8B57;
  --color-felt-light: #34A065;

  /* Secondary Accent - The ritual before every shot */
  --color-chalk: #5B8FAF;

  /* Achievement - Rating gains, streaks, wins (use sparingly) */
  --color-gold: #D4920B;
  --color-gold-light: #F4A100;

  /* Tertiary Warmth - The rack, the bar top */
  --color-brown: #6B4226;
  --color-brown-light: #8B5E3C;

  /* Neutrals */
  --color-white: #FFFFFF;
  --color-ghost: #F0F4F2;
  --color-mid: #7A8A80;

  /* Text Colors */
  --text-primary: #FFFFFF;
  --text-secondary: #8899AA;
  --text-muted: #667788;
  --text-on-light: #0D1B2A;
  --text-on-light-secondary: #3A3A3A;

  /* Semantic Colors */
  --color-success: var(--color-felt-light);
  --color-warning: var(--color-gold);
  --color-danger: #DC3545;
  --color-info: var(--color-chalk);

  /* ---- Typography ---- */
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-weight-regular: 400;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;

  /* Font Sizes - Mobile First */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3rem;      /* 48px */

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  /* ---- Spacing ---- */
  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;     /* 8px */
  --space-3: 0.75rem;    /* 12px */
  --space-4: 1rem;       /* 16px */
  --space-5: 1.25rem;    /* 20px */
  --space-6: 1.5rem;     /* 24px */
  --space-8: 2rem;       /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */

  /* ---- Touch Targets ---- */
  --touch-target-min: 44px;

  /* ---- Border Radius ---- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ---- Shadows ---- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
  --shadow-glow-gold: 0 0 20px rgba(212, 146, 11, 0.4);
  --shadow-glow-felt: 0 0 20px rgba(52, 160, 101, 0.4);

  /* ---- Transitions ---- */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* ---- Z-Index Scale ---- */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-toast: 600;
}

/* ==========================================================================
   Custom Icons (Font Awesome-compatible)
   ========================================================================== */
.fa-billiards {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask-image: url('../img/font/billiards-table-icon.svg');
  mask-image: url('../img/font/billiards-table-icon.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  vertical-align: -0.125em; /* match FA baseline alignment */
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--color-navy);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-4);
  color: var(--text-primary);
}

h1 { font-size: var(--text-3xl); font-weight: var(--font-weight-black); }
h2 { font-size: var(--text-2xl); font-weight: var(--font-weight-extrabold); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

@media (min-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
}

p {
  margin: 0 0 var(--space-4);
}

a {
  color: var(--color-chalk);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-felt-light);
}

.text-brand {
  color: var(--color-felt-light);
}

.text-gold {
  color: var(--color-gold);
}

.text-muted {
  color: var(--text-secondary);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-bold { font-weight: var(--font-weight-bold); }
.font-extrabold { font-weight: var(--font-weight-extrabold); }
.font-black { font-weight: var(--font-weight-black); }

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container-narrow {
  max-width: 600px;
}

.container-wide {
  max-width: 1400px;
}

/* Main content area - leaves room for bottom nav on mobile */
.main-content {
  padding-top: var(--space-4);
  padding-bottom: calc(70px + var(--space-4)); /* Bottom nav height + padding */
  min-height: calc(100vh - 60px); /* Account for top nav */
}

@media (min-width: 768px) {
  .main-content {
    padding-bottom: var(--space-8);
  }
}

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* Grid */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

/* Spacing Utilities */
.m-0 { margin: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0 { padding: 0; }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  display: block;
  background-color: var(--color-slate);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.card-dark {
  background-color: var(--color-navy);
}

.card-header {
  padding: var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-body {
  padding: var(--space-4);
}

.card-footer {
  padding: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Elevated card style for important content */
.card-elevated {
  box-shadow: var(--shadow-lg);
}

/* Card with felt green accent */
.card-success {
  border-color: var(--color-felt-light);
  border-width: 2px;
}

/* Card with gold accent for achievements */
.card-achievement {
  border-color: var(--color-gold);
  border-width: 2px;
  box-shadow: var(--shadow-glow-gold);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--touch-target-min);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

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

/* Primary Button - Felt Green */
.btn-primary {
  background-color: var(--color-felt-light);
  color: var(--color-white);
  border-color: var(--color-felt-light);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-felt);
  border-color: var(--color-felt);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

/* Secondary Button - Outlined */
.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Ghost Button - Minimal */
.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.1);
}

/* Gold Button - For achievements, CTAs */
.btn-gold {
  background-color: var(--color-gold);
  color: var(--color-navy);
  border-color: var(--color-gold);
}

.btn-gold:hover:not(:disabled) {
  background-color: var(--color-gold-light);
  border-color: var(--color-gold-light);
}

/* Danger Button */
.btn-danger {
  background-color: var(--color-danger);
  color: var(--color-white);
  border-color: var(--color-danger);
}

/* Button Sizes */
.btn-sm {
  min-height: 36px;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.btn-lg {
  min-height: 56px;
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

/* Full Width Button */
.btn-block {
  display: flex;
  width: 100%;
}

/* Icon Button (square) */
.btn-icon {
  width: var(--touch-target-min);
  padding: 0;
}

/* ==========================================================================
   Dropdowns (Bootstrap compatibility)
   ========================================================================== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: var(--z-dropdown);
  display: none;
  min-width: 200px;
  padding: var(--space-2) 0;
  margin: var(--space-1) 0 0;
  background-color: var(--color-slate);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Bootstrap adds .show class when dropdown is open */
.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: var(--space-2) var(--space-4);
  color: var(--text-primary);
  text-decoration: none;
  background-color: transparent;
  border: 0;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.dropdown-header {
  display: block;
  padding: var(--space-3) var(--space-4);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.dropdown-divider {
  height: 0;
  margin: var(--space-2) 0;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
}

.badge-primary {
  background-color: var(--color-felt-light);
  color: var(--color-white);
}

.badge-gold {
  background-color: var(--color-gold);
  color: var(--color-navy);
}

.badge-secondary {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.badge-danger {
  background-color: var(--color-danger);
  color: var(--color-white);
}

.badge-info {
  background-color: var(--color-chalk);
  color: var(--color-white);
}

.badge-success {
  background-color: var(--color-felt-light);
  color: var(--color-white);
}

.badge-warning {
  background-color: var(--color-gold);
  color: var(--color-navy);
}

/* Badge sizes */
.badge-sm {
  padding: 2px var(--space-1);
  font-size: var(--text-xs);
}

.badge-lg {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-base);
}

/* Large badge for ratings */
.badge-rating {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-select {
  display: block;
  width: 100%;
  min-height: var(--touch-target-min);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-family);
  font-size: var(--text-base);
  color: var(--text-primary);
  background-color: var(--color-navy);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-felt-light);
  box-shadow: 0 0 0 3px rgba(52, 160, 101, 0.2);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input.is-invalid {
  border-color: var(--color-danger);
}

.form-error {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-danger);
}

/* Checkbox styling for dark theme */
.form-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--color-felt-light);
  cursor: pointer;
}

.form-checkbox:focus {
  outline: 2px solid var(--color-felt-light);
  outline-offset: 2px;
}

/* ==========================================================================
   Tables (Dark Theme)
   ========================================================================== */
.table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.table th {
  background-color: var(--color-navy);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.table tbody tr {
  background-color: var(--color-slate);
  transition: background-color var(--transition-fast);
}

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

/* Striped table variant */
.table-striped tbody tr:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.03);
}

.table-striped tbody tr:nth-child(even) {
  background-color: var(--color-slate);
}

/* Responsive table wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Sticky table header */
.table thead.sticky-top {
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Table row highlight variants */
.table tr.row-gold,
.table tr.rank-1 {
  background-color: rgba(212, 146, 11, 0.2) !important;
}

.table tr.rank-2 {
  background-color: rgba(192, 192, 192, 0.15) !important;
}

.table tr.rank-3 {
  background-color: rgba(205, 127, 50, 0.15) !important;
}

/* Text alignment helpers */
.table .text-center { text-align: center; }
.table .text-end { text-align: right; }

/* ==========================================================================
   Avatars
   ========================================================================== */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  overflow: hidden;
  background-color: var(--color-slate);
  flex-shrink: 0;
}

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

.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 96px; height: 96px; }
.avatar-2xl { width: 128px; height: 128px; }

/* Avatar with ring (for active/winner) */
.avatar-ring-gold {
  box-shadow: 0 0 0 3px var(--color-gold);
}

.avatar-ring-felt {
  box-shadow: 0 0 0 3px var(--color-felt-light);
}

/* ==========================================================================
   Player Card (compact display)
   ========================================================================== */
.player-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background-color: var(--color-slate);
  border-radius: var(--radius-lg);
}

.player-card-info {
  flex: 1;
  min-width: 0;
}

.player-card-name {
  font-weight: var(--font-weight-bold);
  font-size: var(--text-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-card-rating {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Highlighted for current turn */
.player-card-active {
  border: 2px solid var(--color-felt-light);
  box-shadow: var(--shadow-glow-felt);
}

/* Winner highlight */
.player-card-winner {
  border: 2px solid var(--color-gold);
  box-shadow: var(--shadow-glow-gold);
}

/* ==========================================================================
   Rating Display
   ========================================================================== */
.rating-change {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: var(--font-weight-bold);
}

.rating-change-positive {
  color: var(--color-gold);
}

.rating-change-negative {
  color: var(--color-danger);
}

.rating-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-4);
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
}

.rating-value {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-black);
  line-height: 1;
}

.rating-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==========================================================================
   Leaderboard Table
   ========================================================================== */
.leaderboard {
  width: 100%;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.leaderboard-rank {
  width: 32px;
  font-weight: var(--font-weight-black);
  font-size: var(--text-lg);
  color: var(--text-secondary);
  text-align: center;
}

.leaderboard-rank-1 { color: var(--color-gold); }
.leaderboard-rank-2 { color: #C0C0C0; }
.leaderboard-rank-3 { color: #CD7F32; }

.leaderboard-player {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.leaderboard-stats {
  text-align: right;
}

.leaderboard-rating {
  font-weight: var(--font-weight-bold);
  font-size: var(--text-lg);
}

.leaderboard-record {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   Alerts / Flash Messages
   ========================================================================== */
.alert {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  border: 1px solid transparent;
}

.alert-success {
  background-color: rgba(52, 160, 101, 0.15);
  border-color: var(--color-felt-light);
  color: var(--color-felt-light);
}

.alert-warning {
  background-color: rgba(212, 146, 11, 0.15);
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.15);
  border-color: var(--color-danger);
  color: #ff6b7a;
}

.alert-info {
  background-color: rgba(91, 143, 175, 0.15);
  border-color: var(--color-chalk);
  color: var(--color-chalk);
}

/* ==========================================================================
   Empty States
   ========================================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-4);
  text-align: center;
}

.empty-state-icon {
  font-size: var(--text-5xl);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.empty-state-title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-2);
}

.empty-state-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  max-width: 300px;
}

/* ==========================================================================
   Bottom Navigation (Mobile)
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background-color: var(--color-slate);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: var(--z-fixed);
}

@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
  padding: var(--space-2);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--color-felt-light);
}

.bottom-nav-icon {
  font-size: var(--text-xl);
  margin-bottom: var(--space-1);
}

.bottom-nav-label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
}

/* ==========================================================================
   Top Navigation
   ========================================================================== */
.top-nav {
  position: sticky;
  top: 0;
  height: 60px;
  background-color: var(--color-slate);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  padding: 0 var(--space-4);
  z-index: var(--z-sticky);
}

.top-nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-primary);
  text-decoration: none;
}

.top-nav-brand img {
  height: 36px;
  width: auto;
}

.top-nav-brand-text {
  font-weight: var(--font-weight-black);
  font-size: var(--text-lg);
  letter-spacing: 2px;
}

.top-nav-brand-text .brand-accent {
  color: var(--color-felt-light);
}

/* Desktop nav items */
.top-nav-menu {
  display: none;
  gap: var(--space-2);
  margin-left: auto;
}

@media (min-width: 768px) {
  .top-nav-menu {
    display: flex;
  }
}

.top-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--touch-target-min);
  padding: var(--space-2) var(--space-4);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.top-nav-link:hover,
.top-nav-link.active {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.1);
}

.top-nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

@media (min-width: 768px) {
  .top-nav-actions {
    margin-left: var(--space-4);
  }
}

/* ==========================================================================
   Billiard Ball (Scoring Interface)
   ========================================================================== */
.ball-grid-compact {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  max-width: 320px;
  margin: 0 auto;
}

@media (min-width: 400px) {
  .ball-grid-compact {
    grid-template-columns: repeat(5, 1fr);
    max-width: 400px;
  }
}

.ball-touch-target {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  min-height: var(--touch-target-min);
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.ball-touch-target:active:not(:disabled) {
  transform: scale(0.95);
  background-color: rgba(255, 255, 255, 0.1);
}

.ball-touch-target:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.ball-touch-target.ball-sunk {
  opacity: 0.2;
}

/* Ball visual (from sprite sheet) */
.ball-visual {
  width: 50px;
  height: 50px;
  background-image: url("/static/img/billiards/billiards-vector-5016.jpg");
  background-size: 480% 480%;
  background-repeat: no-repeat;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast);
}

@media (min-width: 400px) {
  .ball-visual {
    width: 60px;
    height: 60px;
  }
}

/* ==========================================================================
   Score Display (Game in progress)
   ========================================================================== */
.score-header {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.score-player {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-4);
  background-color: var(--color-slate);
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  transition: all var(--transition-fast);
}

.score-player.active {
  border-color: var(--color-felt-light);
  box-shadow: var(--shadow-glow-felt);
}

.score-player-avatar {
  margin-bottom: var(--space-2);
}

.score-player-name {
  font-weight: var(--font-weight-bold);
  font-size: var(--text-sm);
  text-align: center;
  margin-bottom: var(--space-1);
}

.score-player-count {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-black);
  color: var(--color-felt-light);
}

.score-player-group {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
}

.score-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-weight: var(--font-weight-bold);
}

/* ==========================================================================
   Winner Celebration
   ========================================================================== */
.winner-celebration {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.winner-trophy {
  font-size: var(--text-5xl);
  color: var(--color-gold);
  margin-bottom: var(--space-4);
  animation: bounce 1s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.winner-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-black);
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: var(--space-6);
}

.winner-avatar {
  margin-bottom: var(--space-4);
  animation: fadeInUp 0.5s ease-out;
}

.winner-name {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-black);
  margin-bottom: var(--space-2);
}

.winner-rating-change {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background-color: rgba(212, 146, 11, 0.2);
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-full);
  font-size: var(--text-xl);
  font-weight: var(--font-weight-black);
  color: var(--color-gold);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 146, 11, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(212, 146, 11, 0); }
}

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

/* ==========================================================================
   Utilities
   ========================================================================== */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Mobile only */
@media (min-width: 768px) {
  .md\:hidden { display: none !important; }
}

/* Desktop only */
@media (max-width: 767px) {
  .mobile\:hidden { display: none !important; }
}

/* Round corners */
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Width/Height */
.w-full { width: 100%; }
.h-full { height: 100%; }

/* ==========================================================================
   PAGE-SPECIFIC STYLES
   ========================================================================== */

/* ==========================================================================
   Landing Page
   ========================================================================== */
.landing-page {
  margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) 0;
}

/* Hero Section */
.hero {
  padding: var(--space-8) var(--space-4);
  background: linear-gradient(180deg, var(--color-navy) 0%, var(--color-slate) 100%);
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero-logo {
  height: 48px;
  margin-bottom: var(--space-6);
}

.hero-title {
  font-size: clamp(1.75rem, 6vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto var(--space-6);
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
}

.hero-cta .btn-lg {
  width: 100%;
  max-width: 280px;
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-lg);
}

@media (min-width: 768px) {
  .hero-cta {
    flex-direction: row;
    justify-content: center;
  }

  .hero-cta .btn-lg {
    width: auto;
  }
}

/* Features Section */
.features {
  padding: var(--space-8) var(--space-4);
  background: var(--color-slate);
}

.features-grid {
  display: grid;
  gap: var(--space-4);
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--color-navy);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-felt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  font-size: 1.5rem;
  color: white;
}

.feature-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.feature-desc {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* How It Works Section */
.how-it-works {
  padding: var(--space-8) var(--space-4);
  background: var(--color-navy);
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-bottom: var(--space-6);
}

.steps-grid {
  display: grid;
  gap: var(--space-4);
  max-width: 800px;
  margin: 0 auto;
}

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

@media (min-width: 900px) {
  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step {
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-felt);
  color: white;
  font-size: var(--text-xl);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
}

.step h4 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.step p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* Final CTA Section */
.final-cta {
  padding: var(--space-8) var(--space-4);
  background: linear-gradient(180deg, var(--color-slate) 0%, var(--color-navy) 100%);
}

.cta-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-bottom: var(--space-2);
}

.cta-subtitle {
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
}

/* ==========================================================================
   Dashboard (Authenticated Home Page)
   ========================================================================== */
.dash-header {
  padding: var(--space-4) 0 var(--space-2);
}

.dash-welcome {
  text-align: center;
  padding: var(--space-6) 0;
}

/* Organizer quick-start buttons */
.btn-kott-start {
  background: linear-gradient(135deg, var(--color-gold) 0%, #b8860b 100%);
  color: var(--color-navy);
  font-weight: var(--font-weight-extrabold);
  min-height: 52px;
}

.btn-kott-start:hover {
  color: var(--color-navy);
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
}

/* Quick action cards (2x2 grid) */
.quick-action {
  padding: var(--space-4);
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.quick-action:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-action-icon {
  font-size: 2rem;
  margin-bottom: var(--space-1);
}

.quick-action-label {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
}

/* Reusable dashboard card section */
.dash-card {
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

/* Section title inside dashboard cards */
.dash-section-title {
  margin: 0 0 var(--space-3);
}

/* Section icon (adds right margin, use with .text-gold or .text-info for color) */
.dash-section-icon {
  margin-right: var(--space-2);
}

/* List item row (leaderboard entries, game rows) */
.dash-list-item {
  padding: var(--space-2) var(--space-3);
  background: var(--color-navy);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--transition-fast);
}

.dash-list-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Link-style list item (quick links — slightly more padding) */
.dash-link-item {
  padding: var(--space-3);
  background: var(--color-navy);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--transition-fast);
}

.dash-link-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Rank number (leaderboard inline) */
.rank-num {
  min-width: 24px;
  font-weight: var(--font-weight-bold);
  color: var(--text-secondary);
}

/* Recent game player name states */
.game-player-name {
  font-size: var(--text-sm);
}

.game-player-winner {
  font-weight: var(--font-weight-bold);
  color: var(--color-felt-light);
}

.game-player-loser {
  color: var(--text-secondary);
}

/* No-venue prompt card */
.dash-prompt {
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.dash-prompt-icon {
  font-size: 2rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  display: block;
}

/* Feature icon color variants (landing page) */
.feature-icon-gold {
  background: var(--color-gold);
}

.feature-icon-chalk {
  background: var(--color-chalk);
}

/* TV Display inline-style replacements */
.display-header-icon {
  color: var(--accent, var(--color-felt-light));
  margin-right: 8px;
}

.display-powered-label {
  color: white;
}

.result-trophy-icon {
  color: var(--gold, var(--color-gold));
}

.result-loser-name {
  color: var(--text-secondary);
}

/* ==========================================================================
   Venue List Page
   ========================================================================== */
.venue-list-header {
  padding: var(--space-4) 0 var(--space-3);
}

.venue-list-card {
  padding: var(--space-4);
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.venue-list-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.venue-list-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: rgba(46, 139, 87, 0.15);
  color: var(--color-felt-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.venue-list-name {
  font-size: var(--text-base);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.venue-list-home-badge {
  font-size: var(--text-xs);
  padding: 2px 6px;
}

.venue-list-stats {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.venue-list-stats i {
  margin-right: 2px;
}

.venue-list-live {
  color: var(--color-felt-light);
  font-weight: var(--font-weight-bold);
}

.venue-list-live .fa-circle {
  font-size: 0.5em;
  vertical-align: middle;
}

/* ==========================================================================
   Venue Join Page
   ========================================================================== */
.join-card {
  max-width: 440px;
  margin: var(--space-6) auto;
  text-align: center;
}

.join-card .card-body {
  padding: var(--space-6);
}

.join-venue-badge {
  margin-bottom: var(--space-4);
}

.join-venue-badge .badge {
  background: var(--color-felt);
  font-size: var(--text-base);
  padding: var(--space-2) var(--space-4);
}

.join-heading {
  margin-bottom: var(--space-2);
}

.join-subtitle {
  margin-bottom: var(--space-5);
  font-size: var(--text-lg);
}

.join-cta-primary {
  min-height: 52px;
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

.join-cta-secondary {
  min-height: 48px;
}

.join-features {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.join-features-grid {
  grid-template-columns: 1fr 1fr 1fr;
  text-align: center;
}

.join-feature-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-1);
}

/* Leaderboard page */
.leaderboard-container {
  max-width: 800px;
  margin: 0 auto;
}

.leaderboard-toggle {
  margin-top: var(--space-3);
}

.leaderboard-medal-silver {
  color: #C0C0C0;
}

.leaderboard-medal-bronze {
  color: #CD7F32;
}

/* Rating Legend */
.rating-legend {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.rating-legend .grid {
  grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 640px) {
  .rating-legend .grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ==========================================================================
   Venue Detail Page
   ========================================================================== */
.venue-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0 var(--space-3);
}

.venue-detail-icon {
  color: var(--color-felt-light);
  font-size: 1.5rem;
}

.venue-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.venue-detail-stat {
  background: var(--color-slate);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.venue-detail-stat-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-black);
}

.venue-detail-stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.venue-detail-section {
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.venue-detail-section-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-3);
}

.venue-detail-section-icon {
  color: var(--color-chalk);
  margin-right: var(--space-2);
}

.venue-detail-section-icon-gold {
  color: var(--color-gold);
}

.venue-detail-section-icon-chalk {
  color: var(--color-chalk);
}

.venue-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  background: var(--color-navy);
  border-radius: var(--radius-md);
}

.venue-detail-table-label {
  font-weight: var(--font-weight-bold);
}

.venue-detail-badge-in-use {
  background: var(--color-gold);
  color: var(--color-navy);
}

.venue-detail-badge-oos {
  background: var(--color-danger);
  color: white;
}

.venue-detail-rank {
  min-width: 24px;
  color: var(--text-secondary);
}

.venue-detail-rank-1 {
  color: var(--color-gold);
}

.venue-detail-rank-2 {
  color: #C0C0C0;
}

.venue-detail-rank-3 {
  color: #CD7F32;
}

.venue-detail-winner-name {
  color: var(--color-felt-light);
}

.venue-detail-empty {
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.venue-detail-empty-icon {
  font-size: 2rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

/* ==========================================================================
   Game Result / Winner Celebration
   ========================================================================== */
.game-result-page {
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav-height) + var(--space-4));
}

/* Winner Celebration Section */
.winner-celebration {
  position: relative;
  text-align: center;
  padding: var(--space-4) var(--space-4) var(--space-2);
  background: linear-gradient(180deg, var(--color-navy) 0%, var(--color-slate) 100%);
  overflow: hidden;
}

.trophy-icon {
  font-size: 2.5rem;
  color: var(--color-gold);
  margin-bottom: var(--space-2);
  animation: trophy-bounce 0.8s ease-out;
}

@keyframes trophy-bounce {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  50% { transform: scale(1.2) rotate(10deg); }
  70% { transform: scale(0.9) rotate(-5deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.winner-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--space-2);
  border-radius: 50%;
  border: 4px solid var(--color-gold);
  overflow: hidden;
  animation: avatar-pop 0.6s ease-out 0.2s both;
  box-shadow: 0 0 30px rgba(212, 146, 11, 0.4);
}

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

@keyframes avatar-pop {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.winner-name {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  animation: fade-in-up 0.5s ease-out 0.4s both;
}

.winner-label {
  font-size: var(--text-lg);
  color: var(--color-gold);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fade-in-up 0.5s ease-out 0.5s both;
}

/* Confetti Animation */
.confetti-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  animation: confetti-fall 3s ease-out forwards;
}

.confetti-0 { background: var(--color-gold); left: 10%; animation-delay: 0s; }
.confetti-1 { background: var(--color-felt-light); left: 25%; animation-delay: 0.2s; }
.confetti-2 { background: var(--color-chalk); left: 40%; animation-delay: 0.1s; }
.confetti-3 { background: var(--color-gold); left: 55%; animation-delay: 0.3s; }
.confetti-4 { background: var(--color-felt-light); left: 70%; animation-delay: 0.15s; }

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(400px) rotate(720deg);
    opacity: 0;
  }
}

/* Rating Update Card */
.rating-update-card {
  background: transparent;
  padding: var(--space-4);
  margin: calc(-1 * var(--space-6)) var(--space-0) var(--space-4);
  position: relative;
  animation: slide-up 0.5s ease-out 0.6s both;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rating-title {
  text-align: center;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.rating-title i {
  color: var(--color-chalk);
  margin-right: var(--space-2);
}

.rating-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

.rating-player {
  flex: 1;
  text-align: center;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  max-width: 140px;
}

.rating-player.winner {
  background: rgba(46, 139, 87, 0.2);
}

.rating-player.loser {
  background: rgba(220, 53, 69, 0.2);
}

.rating-player-name {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rating-change {
  margin-bottom: var(--space-1);
}

.rating-delta {
  font-size: var(--text-2xl);
  font-weight: 800;
}

.rating-change.positive .rating-delta {
  color: var(--color-gold);
  text-shadow: 0 0 20px rgba(212, 146, 11, 0.5);
}

.rating-change.negative .rating-delta {
  color: var(--color-danger);
}

.rating-detail {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.rating-detail i {
  margin: 0 var(--space-1);
  font-size: 0.6rem;
}

.rating-vs {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 600;
}

/* Detail Row */
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.detail-label {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.detail-value {
  font-weight: 600;
}

/* Head-to-Head */
.h2h-card .card-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.h2h-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

.h2h-player {
  flex: 1;
  text-align: center;
  max-width: 120px;
}

.h2h-name {
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h2h-wins {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--text-primary);
}

.h2h-player.leading .h2h-wins {
  color: var(--color-felt-light);
}

.h2h-player.trailing .h2h-wins {
  color: var(--color-danger);
}

.h2h-separator {
  font-size: var(--text-xl);
  color: var(--text-secondary);
}

.h2h-total {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: var(--space-2);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.action-primary {
  width: 100%;
  max-width: 300px;
}

.action-secondary-group {
  display: flex;
  gap: var(--space-2);
}

.back-nav {
  margin-top: var(--space-2);
}

/* ==========================================================================
   Scoring Interface
   ========================================================================== */
.score-page {
  padding: var(--space-2);
  max-width: 500px;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Player Score Cards */
.score-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.score-player {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2);
  background-color: var(--color-slate);
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
  gap: 4px;
}

.score-player.active {
  border-color: var(--color-felt-light);
  box-shadow: var(--shadow-glow-felt);
}

/* Turn Badge - compact indicator inside player card */
.turn-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-felt-light);
  color: var(--color-white);
  font-size: 9px;
  font-weight: var(--font-weight-black);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  z-index: 1;
}

/* Sunk balls columns */
.sunk-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 32px;
  min-height: 132px; /* Space for 4 balls: 30px * 4 + 4px * 3 gaps */
  align-items: center;
  justify-content: flex-start;
}

.sunk-col .sunk-ball-mini {
  width: 30px;
  height: 30px;
}

/* Player info center column */
.score-player-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.score-player-info .avatar {
  width: 44px;
  height: 44px;
  border: 2px solid transparent;
  margin-bottom: 4px;
}

.score-player.active .score-player-info .avatar {
  border-color: var(--color-felt-light);
}

.score-player-name {
  font-weight: var(--font-weight-bold);
  font-size: 14px;
  text-align: center;
  max-width: 70px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.score-player-group {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.score-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-xs);
}

/* Ball Grid */
.ball-section {
  margin-bottom: var(--space-2);
}

.ball-grid-new {
  display: flex;
  justify-content: center;
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
}

.ball-grid-new .ball-btn {
  flex: 1 1 0;
  max-width: 48px;
}

.ball-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  padding: 2px;
}

.ball-btn:active:not(:disabled) {
  transform: scale(0.92);
  background-color: rgba(255, 255, 255, 0.15);
}

.ball-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.ball-btn.ball-sunk {
  opacity: 0.2;
  background: transparent;
}

.ball-btn .ball-visual {
  width: 100%;
  height: 100%;
  max-width: 44px;
  max-height: 44px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}


/* Control Buttons */
.control-bar {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

.control-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  padding: var(--space-2);
  background-color: var(--color-slate);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.control-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.control-btn.ball-sunk {
  opacity: 0.2;
}

.control-btn-icon {
  font-size: var(--text-xl);
  margin-bottom: 2px;
}

.control-btn-label {
  font-size: 9px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
}

.control-btn-8ball {
  border-color: rgba(255, 255, 255, 0.4);
}

.control-btn-scratch {
  border-color: var(--color-danger);
}

.control-btn-scratch .control-btn-icon {
  color: var(--color-danger);
}

.control-btn-undo {
  border-color: var(--color-gold);
}

.control-btn-undo .control-btn-icon {
  color: var(--color-gold);
}

/* Sunk Balls Display */
.sunk-balls-section {
  margin-top: var(--space-6);
  padding: var(--space-4);
  background-color: var(--color-slate);
  border-radius: var(--radius-lg);
}

.sunk-balls-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}

.sunk-balls-row + .sunk-balls-row {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-3);
  margin-top: var(--space-2);
}

.sunk-balls-player {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 100px;
}

.sunk-balls-player-name {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
}

.sunk-balls-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  flex: 1;
}

.sunk-ball-mini {
  width: 28px;
  height: 28px;
  background-size: 480% 480%;
  background-image: url("/static/img/billiards/billiards-vector-5016.jpg");
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.sunk-ball-mini.returnable {
  box-shadow: 0 0 0 2px var(--color-gold), 0 0 8px var(--color-gold);
  animation: pulse-glow 1s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 2px var(--color-gold), 0 0 6px var(--color-gold); }
  50% { box-shadow: 0 0 0 3px var(--color-gold), 0 0 12px var(--color-gold); }
}

.sunk-ball-mini.returnable:hover {
  transform: scale(1.15);
}

/* Foul rules active indicator */
.foul-rules-badge {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-felt-light);
  margin-bottom: var(--space-2);
  opacity: 0.8;
}

/* Alert for foul penalty */
.foul-alert {
  padding: var(--space-4);
  background-color: rgba(212, 146, 11, 0.15);
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  text-align: center;
}

.foul-alert-title {
  font-weight: var(--font-weight-bold);
  color: var(--color-gold);
  margin-bottom: var(--space-1);
}

.foul-alert-message {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Game completed overlay */
.game-complete-banner {
  background-color: var(--color-felt-light);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: var(--space-4);
}

.game-complete-banner a {
  color: var(--color-white);
  text-decoration: underline;
}

/* Foul Modal Styling */
.foul-modal .modal-content {
  background-color: var(--color-slate);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.foul-modal .modal-header {
  border-color: rgba(255, 255, 255, 0.1);
}

.foul-modal .modal-title {
  color: var(--text-primary);
}

.foul-modal .modal-body {
  color: var(--text-primary);
}

.foul-modal .modal-footer {
  border-color: rgba(255, 255, 255, 0.1);
}

.foul-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.foul-option:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.foul-option input[type="radio"] {
  margin-top: 3px;
}

.foul-option-label {
  font-weight: var(--font-weight-bold);
}

.foul-option-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   Tournament Stage Builder
   ========================================================================== */
.stage-item {
  transition: all 0.2s;
}

.stage-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stage-item.dragging {
  opacity: 0.5;
}

.drag-handle:hover {
  color: var(--color-chalk) !important;
}

.tournament-flow {
  text-align: center;
}

.flow-stage {
  display: flex;
  align-items: center;
  padding: var(--space-3);
  background: var(--color-slate);
  border-radius: var(--radius-md);
  margin: var(--space-1) 0;
}

.flow-stage-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-chalk);
  color: white;
  border-radius: 50%;
  margin-right: var(--space-3);
}

.flow-stage-content {
  text-align: left;
}

.flow-arrow {
  color: var(--text-secondary);
  font-size: 1.2em;
  margin: var(--space-1) 0;
}

.format-options {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  margin-top: var(--space-3);
  background: var(--color-navy);
}

/* ==========================================================================
   Tournament Bracket
   ========================================================================== */
.bracket-container {
  overflow-x: auto;
  overflow-y: visible;
  padding: var(--space-3) 0;
}

.bracket-svg-wrapper {
  position: relative;
}

.bracket-connectors {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.bracket-connectors path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 2;
}

.bracket-wrapper {
  display: flex;
  gap: 50px;
  padding: var(--space-5);
  min-width: max-content;
  position: relative;
  z-index: 1;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

.round-header {
  text-align: center;
  font-weight: bold;
  padding: var(--space-2) var(--space-3);
  background: var(--color-slate);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

.matches-container {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1;
  gap: var(--space-5);
}

/* Match card styles */
.bracket-match {
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  background: var(--color-slate);
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.bracket-match:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.bracket-match-final {
  border-width: 3px;
  border-color: var(--color-gold);
  background: linear-gradient(135deg, rgba(212, 146, 11, 0.1) 0%, var(--color-slate) 100%);
}

.match-number {
  position: absolute;
  top: -8px;
  left: 8px;
  background: var(--text-secondary);
  color: var(--color-navy);
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 10px;
}

.match-player {
  padding: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  transition: background 0.2s;
  color: var(--text-primary);
}

.match-player.winner {
  background: linear-gradient(135deg, rgba(46, 139, 87, 0.3) 0%, rgba(52, 160, 101, 0.2) 100%);
}

.match-player .seed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.match-player.winner .seed {
  background: var(--color-felt-light);
  color: white;
}

.match-player .player-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.match-vs {
  text-align: center;
  padding: var(--space-1);
  font-weight: bold;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.match-actions {
  position: absolute;
  top: 50%;
  right: -12px;
  transform: translateY(-50%);
}

.match-actions .btn-sm {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Status indicators */
.match-complete {
  border-color: var(--color-felt-light);
}

.match-active {
  border-color: var(--color-gold);
  background: linear-gradient(135deg, rgba(212, 146, 11, 0.15) 0%, var(--color-slate) 100%);
  animation: bracket-pulse 2s infinite;
}

.match-ready {
  border-color: var(--color-chalk);
}

@keyframes bracket-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 146, 11, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(212, 146, 11, 0); }
}

/* KotT live event banner on homepage */
.kott-live-banner {
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
  text-decoration: none;
  box-shadow: inset 4px 0 0 var(--color-gold);
  background: linear-gradient(90deg, var(--color-slate) 0%, rgba(212, 146, 11, 0.08) 100%);
}

.kott-live-banner .kott-live-icon {
  color: var(--color-gold);
  font-size: 1.2rem;
}

.kott-live-banner .kott-live-title {
  color: var(--color-gold);
}

.kott-live-banner .kott-live-detail {
  font-size: var(--text-sm);
}

.kott-live-banner .kott-live-join {
  background: var(--color-gold);
  color: var(--color-navy);
}

/* Champion banner */
.champion-banner {
  background: linear-gradient(135deg, var(--color-gold) 0%, #fd7e14 100%);
  color: var(--color-navy);
  text-align: center;
  padding: var(--space-3);
  font-weight: bold;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  margin-top: var(--space-3);
  text-shadow: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .bracket-wrapper {
    gap: 30px;
    padding: var(--space-3);
  }

  .bracket-round {
    min-width: 150px;
  }

  .match-player {
    padding: var(--space-2);
    font-size: var(--text-sm);
  }

  .match-player .seed {
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }

  .match-actions {
    right: -10px;
  }

  .round-header {
    font-size: var(--text-xs);
    padding: var(--space-2);
  }
}

/* Print styles */
@media print {
  .breadcrumb, .btn, .form-check, #lastUpdated, .match-actions {
    display: none !important;
  }

  .bracket-match {
    break-inside: avoid;
  }

  .card {
    border: 1px solid #000 !important;
    break-inside: avoid;
  }
}

/* Winner selection buttons */
.winner-btn {
  text-align: left;
  padding: var(--space-4) var(--space-5);
}

.winner-btn:hover {
  background: var(--color-chalk);
  color: white;
}

/* ==========================================================================
   Stat Cards (Player Stats, Leaderboard)
   ========================================================================== */
.stat-card {
  background: var(--color-slate);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
  height: 100%;
}

.stat-card .stat-value {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-black);
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.stat-card .stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .stat-sublabel {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

/* Player Header Card */
.player-header {
  background: var(--color-slate);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.player-header .player-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  border: 3px solid var(--color-felt-light);
  object-fit: cover;
}

@media (min-width: 768px) {
  .player-header .player-avatar {
    width: 100px;
    height: 100px;
  }
}

.player-header .player-name {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin: 0;
}

.player-header .player-rank {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* Rating Legend Card */
.rating-legend {
  background: var(--color-slate);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.rating-legend h6 {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
}

.rating-legend .level {
  text-align: center;
}

.rating-legend .level-name {
  display: block;
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

.rating-legend .level-range {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

/* ==========================================================================
   Leaderboard Styles
   ========================================================================== */
.leaderboard-table {
  width: 100%;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--color-slate);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: var(--space-3);
}

.leaderboard-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.leaderboard-row.rank-1 {
  background: linear-gradient(90deg, rgba(212, 146, 11, 0.2), transparent);
  border-left: 3px solid var(--color-gold);
}

.leaderboard-row.rank-2 {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.15), transparent);
  border-left: 3px solid #C0C0C0;
}

.leaderboard-row.rank-3 {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.15), transparent);
  border-left: 3px solid #CD7F32;
}

.leaderboard-rank {
  width: 40px;
  text-align: center;
  font-weight: var(--font-weight-bold);
  color: var(--text-secondary);
}

.leaderboard-rank .crown {
  color: var(--color-gold);
}

.leaderboard-player {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.leaderboard-player img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.leaderboard-player a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: var(--font-weight-bold);
}

.leaderboard-player a:hover {
  color: var(--color-felt-light);
}

.leaderboard-rating {
  min-width: 60px;
  text-align: center;
}

.leaderboard-stats {
  display: none;
  gap: var(--space-4);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

@media (min-width: 640px) {
  .leaderboard-stats {
    display: flex;
  }
}

/* ==========================================================================
   King of the Table Styles
   ========================================================================== */
.king-header {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  color: var(--color-navy);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  text-align: center;
}

.king-header h3 {
  margin: 0;
  font-weight: var(--font-weight-bold);
}

.king-queue {
  background: var(--color-slate);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.king-queue-header {
  background: var(--color-navy);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.king-queue-header h4 {
  margin: 0;
  font-size: var(--text-lg);
}

.king-queue-actions {
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.king-queue-item {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  gap: var(--space-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.king-queue-item:last-child {
  border-bottom: none;
}

.king-queue-item.next-up {
  background: linear-gradient(90deg, rgba(212, 146, 11, 0.3), transparent);
  border-left: 3px solid var(--color-gold);
}

.king-queue-item .player-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.king-queue-item .player-name {
  flex: 1;
}

/* ==========================================================================
   Game List Styles
   ========================================================================== */
.games-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.game-list-item {
  background: var(--color-slate);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-fast);
}

.game-list-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

@media (min-width: 640px) {
  .game-list-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ==========================================================================
   Form Floating Labels (Bootstrap-compatible)
   ========================================================================== */
.form-floating {
  position: relative;
}

.form-floating > .form-control,
.form-floating > .form-input {
  height: 58px;
  padding: var(--space-4);
  padding-top: 24px;
  background: var(--color-navy);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
}

.form-floating > label {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  padding: var(--space-4);
  pointer-events: none;
  border: 1px solid transparent;
  transform-origin: 0 0;
  transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
  color: var(--text-muted);
}

.form-floating > .form-control:focus,
.form-floating > .form-input:focus,
.form-floating > .form-control:not(:placeholder-shown),
.form-floating > .form-input:not(:placeholder-shown) {
  padding-top: 26px;
  outline: none;
  border-color: var(--color-felt-light);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-input:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-input:not(:placeholder-shown) ~ label {
  opacity: 0.65;
  transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Select in floating label */
.form-floating > select.form-control {
  padding-top: 24px;
}

/* ==========================================================================
   Alert Styles
   ========================================================================== */
.alert {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.alert-info {
  background: rgba(91, 143, 175, 0.2);
  border: 1px solid var(--color-chalk);
  color: var(--text-primary);
}

.alert-success {
  background: rgba(52, 160, 101, 0.2);
  border: 1px solid var(--color-felt-light);
  color: var(--text-primary);
}

.alert-warning {
  background: rgba(212, 146, 11, 0.2);
  border: 1px solid var(--color-gold);
  color: var(--text-primary);
}

.alert-danger {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid var(--color-danger);
  color: var(--text-primary);
}

/* ==========================================================================
   Grid & Layout Utilities
   ========================================================================== */
.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

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

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }

/* Gap utilities */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }

/* Text color utilities */
.text-success { color: var(--color-felt-light) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-warning { color: var(--color-gold) !important; }
.text-info { color: var(--color-chalk) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-primary { color: var(--text-primary) !important; }
.text-gold { color: var(--color-gold) !important; }

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right, .text-end { text-align: right; }

/* Font weight */
.font-bold { font-weight: var(--font-weight-bold); }
.font-black { font-weight: var(--font-weight-black); }

/* Spacing utilities */
.py-1 { padding-top: var(--space-1); padding-bottom: var(--space-1); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-5 { padding-top: var(--space-5); padding-bottom: var(--space-5); }

.px-1 { padding-left: var(--space-1); padding-right: var(--space-1); }
.px-2 { padding-left: var(--space-2); padding-right: var(--space-2); }
.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-5 { padding-left: var(--space-5); padding-right: var(--space-5); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }

.my-auto { margin-top: auto; margin-bottom: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Width utilities */
.w-full { width: 100%; }
.w-auto { width: auto; }

/* Responsive display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline { display: inline !important; }
.d-inline-flex { display: inline-flex !important; }

@media (min-width: 640px) {
  .sm\:d-none { display: none !important; }
  .sm\:d-block { display: block !important; }
  .sm\:d-flex { display: flex !important; }
  .d-sm-table-cell { display: table-cell !important; }
  .d-sm-none { display: none !important; }
}

@media (min-width: 768px) {
  .md\:d-none { display: none !important; }
  .md\:d-block { display: block !important; }
  .md\:d-flex { display: flex !important; }
  .d-md-table-cell { display: table-cell !important; }
  .d-md-none { display: none !important; }
}

/* Visibility */
.d-none.d-sm-table-cell { display: none; }
.d-none.d-md-table-cell { display: none; }

@media (min-width: 640px) {
  .d-none.d-sm-table-cell { display: table-cell !important; }
}

@media (min-width: 768px) {
  .d-none.d-md-table-cell { display: table-cell !important; }
}

/* Rounded */
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }
.rounded-circle { border-radius: var(--radius-full); }

/* Row striped (legacy compatibility) */
.row-striped:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.03);
}

.row-striped:nth-child(even) {
  background-color: var(--color-slate);
}

/* Legacy bg- classes remapped to dark theme */
.bg-dark {
  background-color: var(--color-navy) !important;
}

.bg-light {
  background-color: var(--color-slate) !important;
  color: var(--text-primary) !important;
}

.bg-secondary {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.bg-primary {
  background-color: var(--color-felt-light) !important;
}

.bg-success {
  background-color: var(--color-felt-light) !important;
}

.bg-danger {
  background-color: var(--color-danger) !important;
}

.bg-warning {
  background-color: var(--color-gold) !important;
  color: var(--color-navy) !important;
}

.bg-info {
  background-color: var(--color-chalk) !important;
}

.bg-gold {
  background-color: var(--color-gold) !important;
  color: var(--color-navy) !important;
}

.bg-red {
  background-color: var(--color-danger) !important;
}

/* Text on background overrides */
.text-light {
  color: var(--text-primary) !important;
}

/* List group styles */
.list-group {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  list-style: none;
  background: var(--color-slate);
  border-radius: var(--radius-md);
}

.list-group-item {
  padding: var(--space-3) var(--space-4);
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.list-group-item:last-child {
  border-bottom: none;
}

/* Form control and form-select (Bootstrap compatibility) */
.form-control,
.form-select {
  display: block;
  width: 100%;
  min-height: var(--touch-target-min);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-family);
  font-size: var(--text-base);
  color: var(--text-primary);
  background-color: var(--color-navy);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-felt-light);
  box-shadow: 0 0 0 3px rgba(52, 160, 101, 0.2);
}

.form-control.is-invalid {
  border-color: var(--color-danger);
}

.invalid-feedback {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-danger);
}

/* Image sizing */
.prompt-image {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.tiny-crown {
  width: 24px;
  height: 24px;
}

/* Table gold striped (King of Table) */
.table-gold-striped {
  width: 100%;
  border-collapse: collapse;
}

.table-gold-striped th,
.table-gold-striped td {
  padding: var(--space-2) var(--space-3);
  text-align: center;
}

.table-gold-striped thead {
  background: var(--color-gold);
  color: var(--color-navy);
}

.table-gold-striped tbody tr:nth-child(odd) {
  background: rgba(212, 146, 11, 0.15);
}

.table-gold-striped tbody tr:nth-child(even) {
  background: rgba(212, 146, 11, 0.25);
}

/* Tournament card fixes */
.h-100 {
  height: 100%;
}

/* ==========================================================================
   Bootstrap Grid Compatibility
   ========================================================================== */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -12px;
  margin-right: -12px;
}

.row > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-left: 12px;
  padding-right: 12px;
}

.col { flex: 1 0 0%; }
.col-auto { flex: 0 0 auto; width: auto; }

.col-1 { flex: 0 0 auto; width: 8.333333%; }
.col-2 { flex: 0 0 auto; width: 16.666667%; }
.col-3 { flex: 0 0 auto; width: 25%; }
.col-4 { flex: 0 0 auto; width: 33.333333%; }
.col-5 { flex: 0 0 auto; width: 41.666667%; }
.col-6 { flex: 0 0 auto; width: 50%; }
.col-7 { flex: 0 0 auto; width: 58.333333%; }
.col-8 { flex: 0 0 auto; width: 66.666667%; }
.col-9 { flex: 0 0 auto; width: 75%; }
.col-10 { flex: 0 0 auto; width: 83.333333%; }
.col-11 { flex: 0 0 auto; width: 91.666667%; }
.col-12 { flex: 0 0 auto; width: 100%; }

/* Small screens (640px+) */
@media (min-width: 640px) {
  .col-sm-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-sm-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-sm-3 { flex: 0 0 auto; width: 25%; }
  .col-sm-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-sm-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-sm-6 { flex: 0 0 auto; width: 50%; }
  .col-sm-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-sm-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-sm-9 { flex: 0 0 auto; width: 75%; }
  .col-sm-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-sm-11 { flex: 0 0 auto; width: 91.666667%; }
  .col-sm-12 { flex: 0 0 auto; width: 100%; }
}

/* Medium screens (768px+) */
@media (min-width: 768px) {
  .col-md-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-md-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-md-3 { flex: 0 0 auto; width: 25%; }
  .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-md-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-md-6 { flex: 0 0 auto; width: 50%; }
  .col-md-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-md-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-md-9 { flex: 0 0 auto; width: 75%; }
  .col-md-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-md-11 { flex: 0 0 auto; width: 91.666667%; }
  .col-md-12 { flex: 0 0 auto; width: 100%; }
  .offset-md-2 { margin-left: 16.666667%; }
}

/* Large screens (1024px+) */
@media (min-width: 1024px) {
  .col-lg-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-lg-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-lg-3 { flex: 0 0 auto; width: 25%; }
  .col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-lg-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-lg-6 { flex: 0 0 auto; width: 50%; }
  .col-lg-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-lg-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-lg-9 { flex: 0 0 auto; width: 75%; }
  .col-lg-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-lg-11 { flex: 0 0 auto; width: 91.666667%; }
  .col-lg-12 { flex: 0 0 auto; width: 100%; }
}

/* Bootstrap flex utilities */
.d-grid { display: grid !important; }
.d-md-flex { display: flex !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-md-end { justify-content: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }

/* Bootstrap spacing */
.me-1 { margin-right: var(--space-1) !important; }
.me-2 { margin-right: var(--space-2) !important; }
.me-3 { margin-right: var(--space-3) !important; }
.ms-1 { margin-left: var(--space-1) !important; }
.ms-2 { margin-left: var(--space-2) !important; }
.ms-3 { margin-left: var(--space-3) !important; }
.ms-auto { margin-left: auto !important; }
.me-auto { margin-right: auto !important; }
.pe-1 { padding-right: var(--space-1) !important; }
.ps-1 { padding-left: var(--space-1) !important; }

/* Modal styles (Bootstrap JS expects these) */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1050;
  background: rgba(0, 0, 0, 0.5);
  overflow: auto;
}

.modal.show {
  display: block;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: var(--space-6) auto;
  max-width: 500px;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--color-slate);
  background-clip: padding-box;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  outline: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: var(--space-4);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-close {
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  padding: 0.25em;
  color: var(--text-primary);
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border: 0;
  border-radius: 0.25rem;
  opacity: 0.5;
  cursor: pointer;
}

.btn-close:hover {
  opacity: 1;
}

/* Breadcrumb styles */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin-bottom: var(--space-4);
  list-style: none;
  font-size: var(--text-sm);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  padding: 0 var(--space-2);
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--color-chalk);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--color-felt-light);
}

.breadcrumb-item.active {
  color: var(--text-secondary);
}

/* Table styling for Bootstrap-style tables */
.table-sm th,
.table-sm td {
  padding: var(--space-2) var(--space-3);
}

.table-bordered {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.table-bordered th,
.table-bordered td {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Form text helper */
.form-text {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Horizontal rule */
hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: var(--space-4) 0;
}

/* Button outline variants */
.btn-outline-secondary {
  color: var(--text-secondary);
  border-color: var(--text-secondary);
  background: transparent;
}

.btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-outline-primary {
  color: var(--color-felt-light);
  border-color: var(--color-felt-light);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--color-felt-light);
  color: var(--color-white);
}

.btn-outline-danger {
  color: var(--color-danger);
  border-color: var(--color-danger);
  background: transparent;
}

.btn-outline-danger:hover {
  background: var(--color-danger);
  color: var(--color-white);
}

.btn-outline-success {
  color: var(--color-felt-light);
  border-color: var(--color-felt-light);
  background: transparent;
}

.btn-outline-success:hover {
  background: var(--color-felt-light);
  color: var(--color-white);
}

/* Font weight */
.fw-bold { font-weight: var(--font-weight-bold) !important; }
.fw-bolder { font-weight: var(--font-weight-black) !important; }

/* Additional display utilities */
.d-inline-flex { display: inline-flex !important; }

/* Text size utilities */
.fs-5 { font-size: var(--text-lg) !important; }
.fs-6 { font-size: var(--text-base) !important; }

/* Additional heading sizes */
.h1 { font-size: var(--text-4xl); font-weight: var(--font-weight-bold); }
.h2 { font-size: var(--text-3xl); font-weight: var(--font-weight-bold); }
.h3 { font-size: var(--text-2xl); font-weight: var(--font-weight-bold); }
.h4 { font-size: var(--text-xl); font-weight: var(--font-weight-bold); }
.h5 { font-size: var(--text-lg); font-weight: var(--font-weight-bold); }
.h6 { font-size: var(--text-base); font-weight: var(--font-weight-bold); }

.display-5 { font-size: var(--text-4xl); font-weight: var(--font-weight-black); }
.display-6 { font-size: var(--text-3xl); font-weight: var(--font-weight-black); }

/* Sticky */
.sticky-top {
  position: sticky;
  top: 0;
  z-index: 1020;
}

/* Border utilities */
.border { border: 1px solid rgba(255, 255, 255, 0.2) !important; }
.border-0 { border: 0 !important; }
.border-secondary { border-color: rgba(255, 255, 255, 0.2) !important; }
.border-light { border-color: rgba(255, 255, 255, 0.3) !important; }
.border-3 { border-width: 3px !important; }

/* Text decoration */
.text-decoration-none { text-decoration: none !important; }

/* Margins in different units */
.m-auto { margin: auto !important; }
.m-0 { margin: 0 !important; }
.my-1 { margin-top: var(--space-1) !important; margin-bottom: var(--space-1) !important; }
.my-2 { margin-top: var(--space-2) !important; margin-bottom: var(--space-2) !important; }
.my-3 { margin-top: var(--space-3) !important; margin-bottom: var(--space-3) !important; }
.my-4 { margin-top: var(--space-4) !important; margin-bottom: var(--space-4) !important; }
.mb-0 { margin-bottom: 0 !important; }
.mr-2 { margin-right: var(--space-2) !important; }
.text-sm { font-size: var(--text-sm) !important; }
.text-xs { font-size: var(--text-xs) !important; }

/* Pill badge shape */
.rounded-pill { border-radius: 50rem !important; }

/* Collapse (Bootstrap JS) */
.collapse:not(.show) {
  display: none;
}

.collapse.show {
  display: block;
}

/* Image utilities */
.img-fluid {
  max-width: 100%;
  height: auto;
}

/* Card image utilities */
.card-img-obj {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* ==========================================================================
   Under Construction Page
   ========================================================================== */
.construction-page {
  text-align: center;
  padding: var(--space-6) 0;
  max-width: 480px;
  margin: 0 auto;
}

.construction-banner-plain {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  margin-bottom: var(--space-5);
}

.construction-banner-icon-gold {
  font-size: 1.5rem;
  color: var(--color-gold);
}

.construction-banner-text {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-black);
  color: var(--color-white);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.construction-image-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-5);
}

.construction-image {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: var(--radius-lg);
  opacity: 0.85;
}

.construction-tape {
  position: absolute;
  left: -20px;
  right: -20px;
  height: 28px;
  background: repeating-linear-gradient(
    -45deg,
    var(--color-gold),
    var(--color-gold) 12px,
    transparent 12px,
    transparent 24px
  );
  opacity: 0.9;
}

.construction-tape-bottom {
  top: 50%;
  transform: translateY(-50%) rotate(-40deg);
}

.construction-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-black);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.construction-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-5);
  padding: 0 var(--space-4);
}

.construction-stripes {
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    var(--color-gold),
    var(--color-gold) 8px,
    var(--color-navy) 8px,
    var(--color-navy) 16px
  );
  border-radius: var(--radius-full);
  margin-bottom: var(--space-5);
}

.construction-features {
  display: flex;
  justify-content: center;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.construction-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.construction-feature-icon {
  font-size: 1.5rem;
  color: var(--color-gold);
}

.construction-back-btn {
  display: inline-flex;
  align-items: center;
}
