/* ============================================
   HOOP GRIDS — PREMIUM UI ENHANCEMENT
   Enhanced visual design with no functionality changes
   ============================================ */

:root {
  --bg-app: #f0f4f8;
  --bg-card: #ffffff;
  --border: #e2e8f0;

  --navy: #0f172a;
  --gold: #fe6f42;
  --blue: #3b82f6;
  --gray-text: #64748b;

  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);

  /* Premium Rarity Colors */
  --tier-starter: #64748b;
  --tier-allstar: #e11d48;
  --tier-allnba: #2563eb;
  --tier-mvp: #ca8a04;
  --tier-hof: #f8fafc;
  --tier-legend: #7c3aed;
  --tier-goat: #000000;

  /* ✨ NEW: Premium Palette */
  --premium-bg: linear-gradient(145deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  --premium-grid-bg: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
  --premium-cell-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  --premium-cell-hover: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
  --premium-gold: #fe6f42;
  --premium-gold-light: #fed7aa;
  --premium-shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  --premium-shadow-xl: 0 20px 40px -10px rgba(15, 23, 42, 0.2), 0 10px 15px -5px rgba(15, 23, 42, 0.1);
  --premium-glow: 0 0 30px rgba(254, 111, 66, 0.15);
  --premium-inner-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), inset 0 -1px 2px rgba(0, 0, 0, 0.04);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
}

/* User Avatar Styles */
.user-letter-avatar {
  width: 32px;
  height: 32px;
  background: #10b981;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  border: 2px solid white;
  box-shadow: 0 0 0 1px #e2e8f0;
}

body.mode-hard .user-letter-avatar {
  border-color: #fff1f4;
}

body.mode-reverse .user-letter-avatar {
  border-color: #fff7ec;
}

/* Mode Based Colors */
body.mode-hard {
  --bg-app: #fff1f4;
  background: linear-gradient(180deg, #fff1f4 0%, #ffe4e8 40%, #fff1f4 100%);
}

body.mode-reverse {
  --bg-app: #fff7ec;
  background: linear-gradient(180deg, #fff7ec 0%, #fff1de 40%, #fff7ec 100%);
}

/* Update other white components to blend in modes */
body.mode-hard .app-header, 
body.mode-hard .game-meta-strip,
body.mode-hard .score-card {
  background: linear-gradient(135deg, #ffffff 0%, #fff1f4 100%);
}

body.mode-reverse .app-header, 
body.mode-reverse .game-meta-strip,
body.mode-reverse .score-card {
  background: linear-gradient(135deg, #ffffff 0%, #fff7ec 100%);
}

/* Ensure smooth transitions */
body {
  transition: background 0.5s ease;
}

.app-header, .game-meta-strip, .score-card {
  transition: background 0.5s ease, box-shadow 0.3s ease;
}
.app-header,
.score-card,
.grid-cell,
.modal-content {
  transition: background-color 0.3s ease;
}

body.mode-hard .app-header,
body.mode-hard .score-card,
body.mode-hard .game-meta-strip {
  background-color: #fff1f4;
}

body.mode-reverse .app-header,
body.mode-reverse .score-card,
body.mode-reverse .game-meta-strip {
  background-color: #fff7ec;
}

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

html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background-color: var(--bg-app);
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
  /* ✨ Premium: Subtle gradient background instead of flat */
  background: linear-gradient(180deg, #f0f4f8 0%, #e8edf4 40%, #f0f4f8 100%);
  background-attachment: fixed;
}

/* ============================================
   HEADER — Premium Elevation
   ============================================ */
.app-header {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  /* ✨ Premium: Richer shadow + subtle gradient */
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
}

.header-inner {
  max-width: 700px; /* Aligned with main content */
  width: 100%;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

.header-left {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.header-center {
  flex: 0;
  display: flex;
  justify-content: center;
  min-width: 180px;
}

.header-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}

@media (max-width: 600px) {
  .header-inner {
    padding: 0.5rem 0.75rem;
  }
  
  .header-left {
    flex: 0;
    margin-right: 10px;
  }
  
  .header-center {
    flex: 1;
    justify-content: flex-start;
    min-width: 0;
  }

  .header-right {
    flex: 0;
    gap: 8px;
  }
  
  .brand-logo {
    font-size: 1.25rem;
  }
  
  .nba-badge {
    font-size: 0.55rem;
    padding: 1px 3px;
  }
}

.nav-trigger,
.header-icon {
  background: none;
  border: none;
  color: var(--navy);
  cursor: pointer;
  padding: 4px;
  /* ✨ Premium: Smooth hover */
  transition: all 0.2s ease;
  border-radius: 8px;
}

.nav-trigger:hover,
.header-icon:hover {
  background: #f1f5f9;
  transform: scale(1.05);
}

.brand-logo {
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  /* ✨ Premium: Letter spacing refinement */
  letter-spacing: -0.8px;
}

.brand-grids {
  color: var(--gold);
  margin-right: 4px;
  /* ✨ Premium: Subtle glow on brand */
  text-shadow: 0 0 20px rgba(254, 111, 66, 0.2);
}

.nba-badge {
  background: var(--navy);
  color: white;
  font-size: 0.6rem;
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: 900;
  /* ✨ Premium: Subtle letter-spacing */
  letter-spacing: 0.5px;
}

.game-meta-strip {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-text);
  background: white;
  border-bottom: 1px solid var(--border);
  /* ✨ Premium: Subtle gradient background */
  background: linear-gradient(90deg, #fafbfc 0%, #ffffff 50%, #fafbfc 100%);
  letter-spacing: 0.3px;
}

/* ============================================
   MODE BAR — Premium Pills
   ============================================ */
.mode-bar-wrapper {
  display: flex;
  justify-content: center;
  padding: 0.5rem 1rem;
}

.mode-pills {
  display: flex;
  background: #e8ecf1;
  padding: 4px;
  border-radius: 30px;
  gap: 4px;
  /* ✨ Premium: Glass-like container */
  background: linear-gradient(135deg, #e8ecf1 0%, #dde3ea 100%);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.pill {
  border: none;
  background: none;
  padding: 0.5rem 1.25rem;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-text);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 4px;
  /* ✨ Premium: Smoother transition */
}

.pill.active {
  background: white;
  color: var(--navy);
  /* ✨ Premium: Richer shadow + subtle gradient */
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1), 0 1px 2px rgba(15, 23, 42, 0.06);
  font-weight: 700;
}

.pill:not(.active):hover {
  background: rgba(255, 255, 255, 0.5);
  color: var(--navy);
}

.badge-new {
  background: var(--navy);
  color: white;
  font-size: 0.6rem;
  padding: 1px 4px;
  border-radius: 4px;
  /* ✨ Premium: Tiny letter-spacing */
  letter-spacing: 0.3px;
}

/* ============================================
   SCORE CARD — Premium Card Design
   ============================================ */
.content-wrapper {
  max-width: 700px;
  margin: 0 auto;
  padding: 0.75rem;
}

.score-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 20px 20px;
  /* ✨ Premium: Multi-layer shadow + subtle gradient bg */
  box-shadow: var(--premium-shadow-lg);
  margin-bottom: 15px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 50%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

/* ✨ Premium: Decorative accent line at top of score card */
.score-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #fe6f42 0%, #ff8e3c 50%, #fbbf24 100%);
  border-radius: 20px 20px 0 0;
}

.score-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.score-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--gray-text);
  /* ✨ Premium: Better letter-spacing */
  letter-spacing: 0.2px;
}

.score-hint {
  font-size: 0.8rem;
  color: var(--gray-text);
  margin-top: 4px;
}

.score-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--navy);
  /* ✨ Premium: Tabular numbers for score */
  font-variant-numeric: tabular-nums;
}

.score-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--gray-text);
}

.bold {
  font-weight: 700;
  color: var(--navy);
}

/* ============================================
   GRID — PREMIUM REDESIGN
   ============================================ */
.grid-main-body {
  display: grid;
  grid-template-columns: 120px repeat(3, 1fr);
  gap: 12px;
  /* ✨ PREMIUM: Dark navy gradient background instead of flat grey */
  background: var(--premium-grid-bg);
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(30, 41, 59, 0.8);
  max-width: 700px;
  margin: 0 auto;
  /* ✨ Premium: Rich glow shadow */
  box-shadow:
    var(--premium-shadow-xl),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ============================================
   CORNER BOX — Premium Badge
   ============================================ */
.corner-box {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  color: #94a3b8;
  /* ✨ Premium: Glass-style on dark bg instead of flat grey */
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  margin: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(4px);
  letter-spacing: 0.5px;
}

.corner-box.completed {
  /* ✨ Premium: Gold gradient + glow on completion */
  background: linear-gradient(135deg, #fe6f42 0%, #ff8e3c 50%, #fbbf24 100%);
  color: white;
  border-color: rgba(254, 111, 66, 0.6);
  box-shadow: 0 0 20px rgba(254, 111, 66, 0.4), 0 0 40px rgba(254, 111, 66, 0.15);
  animation: completedPulse 2s ease-in-out infinite;
}

@keyframes completedPulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(254, 111, 66, 0.4), 0 0 40px rgba(254, 111, 66, 0.15);
  }

  50% {
    box-shadow: 0 0 25px rgba(254, 111, 66, 0.5), 0 0 50px rgba(254, 111, 66, 0.2);
  }
}

/* ============================================
   COLUMN & ROW HEADERS — Premium Typography
   ============================================ */
.col-head,
.row-head {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--navy);
  text-transform: math-auto;
  text-align: center;
  padding: 8px;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  /* ✨ Premium: White text on dark grid bg */
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.8px;
  font-weight: 700;
}

.col-head {
  padding-bottom: 12px;
  min-height: 70px;
  align-items: flex-end;
  /* ✨ Premium: Subtle bottom glow line */
  position: relative;
}

.col-head::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(254, 111, 66, 0.5), transparent);
  border-radius: 2px;
}

.row-head {
  padding-right: 15px;
  justify-content: flex-end;
  min-height: 100%;
  /* ✨ Premium: Subtle right glow line */
  position: relative;
}

.row-head::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  bottom: 20%;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(254, 111, 66, 0.5), transparent);
  border-radius: 2px;
}

.team-logo-header {
  max-width: 80px;
  max-height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  /* ✨ Premium: Brighter on dark bg */
  filter: brightness(1.1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

@media (max-width: 600px) {
  .team-logo-header {
    max-width: 55px;
    max-height: 55px;
  }
}

/* ============================================
   GRID CELLS — Premium Interactive Cards
   ============================================ */
.grid-cell {
  aspect-ratio: 1;
  /* ✨ Premium: Gradient bg instead of flat white */
  background: var(--premium-cell-bg);
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* ✨ Premium: Multi-layer shadow */
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  /* ✨ Premium: Subtle border */
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.grid-cell:hover {
  /* ✨ Premium: Gold-tinted hover with lift */
  background: var(--premium-cell-hover);
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 20px rgba(254, 111, 66, 0.2),
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border-color: rgba(254, 111, 66, 0.3);
}

.grid-cell:active {
  transform: translateY(-1px) scale(0.98);
  transition-duration: 0.1s;
}

.cell-plus {
  font-size: 2rem;
  /* ✨ Premium: Warmer, lighter color instead of flat grey */
  color: rgba(148, 163, 184, 0.5);
  font-weight: 200;
  /* ✨ Premium: Subtle pulse animation on empty cells */
  animation: subtlePulse 3s ease-in-out infinite;
  transition: all 0.3s ease;
}

@keyframes subtlePulse {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.grid-cell:hover .cell-plus {
  color: rgba(254, 111, 66, 0.6);
  opacity: 1;
  animation: none;
  transform: scale(1.15);
}

.cell-player-content {
  width: 100%;
  height: 100%;
  position: relative;
}

.cell-player-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0 auto;
  display: block;
}

.cell-rarity-tag {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.5rem;
  font-weight: 900;
  background: var(--navy);
  color: white;
  padding: 1px 4px;
  border-radius: 4px;
  z-index: 5;
  /* ✨ Premium: Tiny shadow on tag */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.player-name-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 0.55rem;
  font-weight: 800;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  padding: 3px 2px;
  line-height: 1;
  text-transform: uppercase;
  z-index: 5;
  border-top: 1px solid var(--border);
  /* ✨ Premium: Backdrop blur */
  backdrop-filter: blur(8px);
  letter-spacing: 0.3px;
}

/* ============================================
   TIER SPECIFICS — Premium Rarity Badges
   ============================================ */
.tier-starter {
  background: var(--tier-starter) !important;
  color: white;
}

.tier-allstar {
  background: var(--tier-allstar) !important;
  color: white;
  /* ✨ Premium: Subtle glow */
  box-shadow: 0 0 12px rgba(225, 29, 72, 0.4) !important;
}

.tier-allnba {
  background: var(--tier-allnba) !important;
  color: white;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.4) !important;
}

.tier-mvp {
  background: var(--tier-mvp) !important;
  color: white;
  box-shadow: 0 0 12px rgba(202, 138, 4, 0.4) !important;
}

.tier-hof {
  background: var(--tier-hof) !important;
  color: var(--navy);
  border: 1px solid var(--border);
  box-shadow: 0 0 15px rgba(248, 250, 252, 0.3), inset 0 0 8px rgba(248, 250, 252, 0.2) !important;
}

.tier-legend {
  background: var(--tier-legend) !important;
  color: white;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.5) !important;
}

.tier-goat {
  background: var(--tier-goat) !important;
  color: #fe6f42;
  border: 1px solid #fe6f42;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
  /* ✨ Premium: Stronger glow */
  box-shadow: 0 0 20px rgba(254, 111, 66, 0.5), 0 0 40px rgba(254, 111, 66, 0.2) !important;
}

/* Reverse Mode Specifics */
.tier-face {
  background: #f97316 !important;
  color: white;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.4);
}

.tier-common {
  background: #22c55e !important;
  color: white;
}

.tier-rare {
  background: #94a3b8 !important;
  color: white;
}

/* ============================================
   MODALS — Premium Glass Design
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* ✨ Premium: Darker overlay with blur */
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  /* ✨ Premium: Smooth fade-in */
  animation: overlayFadeIn 0.2s ease-out;
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-content {
  background: white;
  width: 90%;
  max-width: 450px;
  border-radius: 24px;
  padding: 1.5rem;
  /* ✨ Premium: Richer shadow + subtle border */
  box-shadow: var(--premium-shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.5);
  /* ✨ Premium: Slide-up animation */
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.search-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.search-top h3 {
  /* ✨ Premium: Bolder heading */
  font-weight: 800;
  letter-spacing: -0.3px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--navy);
  /* ✨ Premium: Hover circle */
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.close-btn:hover {
  background: #f1f5f9;
  color: var(--navy);
}

.search-input-wrap input {
  width: 100%;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-size: 1rem;
  /* ✨ Premium: Better focus state */
  transition: all 0.2s ease;
  font-weight: 500;
}

.search-input-wrap input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(254, 111, 66, 0.15);
  background: white;
}

/* ============================================
   SIDE MENU DRAWER — Premium Dark
   ============================================ */
.side-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 2000;
  display: flex;
  justify-content: flex-start;
  backdrop-filter: blur(4px);
}

.side-menu-overlay[hidden] {
  display: none !important;
}

.side-menu-content {
  /* ✨ Premium: Darker, richer sidebar */
  background: linear-gradient(180deg, #0f172a 0%, #1a2332 100%);
  color: #fff;
  width: 280px;
  height: 100%;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.menu-links {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.menu-item {
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.9;
  transition: all 0.2s;
  /* ✨ Premium: Rounded hover bg */
  padding: 8px 12px;
  border-radius: 10px;
  margin: -8px -12px;
}

.menu-item:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 2rem 0;
}

.more-games-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}

.game-link {
  display: block;
  color: #fff;
  text-decoration: none;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  /* ✨ Premium: Hover state */
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.game-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ============================================
   STATS MODAL — Premium Design
   ============================================ */
.stats-modal {
  max-width: 450px;
  padding: 2rem;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 20px 0;
}

.stat-item {
  /* ✨ Premium: Gradient bg + premium border */
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 15px;
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* ✨ Premium: Decorative accent on stat items */
.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-item:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 8px 20px rgba(254, 111, 66, 0.15);
}

.stat-item:hover::before {
  opacity: 1;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--gray-text);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 4px;
}

.result-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 25px 0;
}

.result-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 15px;
}

.premium-result-card {
  /* ✨ Premium: Gradient navy bg with gold accent */
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: white;
  padding: 20px;
  border-radius: 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.2);
  /* ✨ Premium: Gold accent border */
  border: 1px solid rgba(254, 111, 66, 0.15);
  position: relative;
  overflow: hidden;
}

/* ✨ Premium: Shimmer effect on result card */
.premium-result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(254, 111, 66, 0.03) 45%,
      rgba(254, 111, 66, 0.06) 50%,
      rgba(254, 111, 66, 0.03) 55%,
      transparent 100%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-50%);
  }

  100% {
    transform: translateX(50%);
  }
}

.rarity-big-wrap {
  margin-bottom: 10px;
}

.rarity-score-big {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.rarity-label {
  font-size: 0.8rem;
  opacity: 0.7;
  letter-spacing: 0.5px;
}

.correct-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 15px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stats-actions {
  display: flex;
  gap: 12px;
}

.btn-premium {
  flex: 1;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-copy {
  background: #f1f5f9;
  color: var(--navy);
  border: 1px solid var(--border);
}

.btn-copy:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-share {
  background: linear-gradient(135deg, #fe6f42 0%, #ff8e3c 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(254, 111, 66, 0.3);
}

.btn-share:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(254, 111, 66, 0.4);
}

@media (max-width: 480px) {
  .stats-actions {
    flex-direction: column;
  }
}

.search-results {
  list-style: none;
  margin-top: 1rem;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  /* ✨ Premium: Hover transition */
  transition: all 0.15s ease;
  border-radius: 8px;
}

.search-result-item:hover {
  background: #f8fafc;
  transform: translateX(4px);
}

.search-result-item img {
  width: 40px;
  border-radius: 4px;
  margin-right: 1rem;
}

.sr-info {
  display: flex;
  flex-direction: column;
}

.sr-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
}

.sr-years {
  font-size: 0.8rem;
  color: var(--gray-text);
  margin-top: 2px;
}

/* ============================================
   HINT MODAL — Premium Cards
   ============================================ */
.hint-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  /* ✨ Premium: Hover transition */
  transition: all 0.2s ease;
  padding: 8px;
  border-radius: 12px;
}

.hint-card:hover {
  background: #f8fafc;
  transform: scale(1.03);
}

.hint-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  /* ✨ Premium: Better shadow */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.hint-card:hover img {
  border-color: var(--gold);
  box-shadow: 0 4px 16px rgba(254, 111, 66, 0.2);
}

.hint-card-name {
  font-size: 0.8rem;
  font-weight: bold;
  text-align: center;
}

.hint-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.strike.active {
  background: var(--navy) !important;
}

/* ============================================
   SEARCH MODAL — Premium Context Bar
   ============================================ */
#search-context-bar {
  /* ✨ Premium: Gradient bg instead of flat */
  background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%) !important;
  border: 1px solid rgba(254, 111, 66, 0.2);
  font-weight: 700;
}

#possible-count-wrap {
  /* ✨ Premium: Muted style */
  color: #94a3b8;
}

#btn-hint-open {
  /* ✨ Premium: Better hint button */
  background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s;
  font-weight: 700 !important;
}

#btn-hint-open:hover {
  border-color: var(--gold) !important;
  box-shadow: 0 2px 10px rgba(254, 111, 66, 0.15);
  transform: translateY(-1px);
}

/* ============================================
   HOW TO PLAY — Premium Layout
   ============================================ */
.how-to-content {
  /* ✨ Premium: Better line height + letter spacing */
  line-height: 1.7;
  letter-spacing: 0.1px;
}

/* ============================================
   RESPONSIVE — Premium Mobile
   ============================================ */
@media (max-width: 600px) {
  .grid-main-body {
    grid-template-columns: 80px repeat(3, 1fr);
    padding: 10px;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    /* ✨ Premium: Keep dark bg on mobile */
  }

  .col-head,
  .row-head {
    font-size: 0.65rem;
    padding: 4px;
  }

  .col-head {
    min-height: 60px;
  }

  .score-value {
    font-size: 1.3rem;
  }

  /* ✨ Premium: Smaller but still elegant cells on mobile */
  .grid-cell {
    border-radius: 10px;
  }

  .grid-cell:hover {
    transform: translateY(-2px) scale(1.01);
  }
}

@media (max-width: 450px) {
  .grid-main-body {
    grid-template-columns: 70px repeat(3, 1fr);
    gap: 6px;
    padding: 8px;
  }

  .col-head,
  .row-head {
    font-size: 0.6rem;
  }
}

/* ============================================
   GRID NAVIGATION — Premium Buttons
   ============================================ */
.grid-navigation-wrapper {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 16px;
}

.btn-nav-grid {
  background: white;
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-nav-grid:hover:not(:disabled) {
  background: var(--navy);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn-nav-grid:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================
   LEADERBOARD MODAL — Premium Layout
   ============================================ */
.leaderboard-modal {
  max-width: 500px;
  padding: 1.5rem;
}

.leaderboard-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.l-tab {
  flex: 1;
  text-align: center;
  padding: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  color: var(--gray-text);
}

.l-tab.active {
  background: white;
  color: var(--navy);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--gray-text);
  padding: 10px;
  border-bottom: 2px solid var(--border);
}

.leaderboard-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
  font-weight: 600;
  font-size: 0.95rem;
}

.leaderboard-table tr:last-child td {
  border-bottom: none;
}

.rank-badge {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 800;
}

.rank-1 .rank-badge { background: #fef3c7; color: #92400e; }
.rank-2 .rank-badge { background: #e2e8f0; color: #475569; }
.rank-3 .rank-badge { background: #ffedd5; color: #9a3412; }

.leaderboard-score {
  color: var(--gold);
  font-weight: 800;
}

/* ============================================
   PREMIUM TOOLTIPS
   ============================================ */
.has-tooltip {
  position: relative;
}

.has-tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px) !important;
  bottom: auto !important;
  right: auto !important;
  height: auto !important;
  left: 50%;
  transform: translateX(-50%);
  background: #1e1e1e !important;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
width: auto;
min-width: 100px;
  max-width: 160px;
  text-align: center;
  z-index: 9999;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  pointer-events: none;
  animation: tooltipFade 0.15s ease-out;
  text-transform: none;
  letter-spacing: normal;
}

.has-tooltip:hover::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #1e1e1e transparent;
  z-index: 9999;
  pointer-events: none;
  animation: tooltipFade 0.15s ease-out;
}

@keyframes tooltipFade {
  from { opacity: 0; transform: translateX(-50%) translateY(3px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}