/* ==========================================================================
   The Game Scorecard - Google Play Store Dark Theme (Material 3)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Google+Sans+Text:wght@400;500;700&family=Roboto:wght@400;500;700;900&display=swap');

:root {
  /* Google Play Store Light Palette */
  --bg-main: #f5f5f5;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f9f9f9;
  --bg-input: #ffffff;
  
  --border-color: #e0e0e0;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: #01875f;
  
  --play-green: #01875f;
  --play-green-light: #00a86b;
  --play-green-hover: #00704e;
  --play-green-tint: rgba(1, 135, 95, 0.1);
  --play-green-text: #01875f;
  
  --google-blue: #1a73e8;
  --google-red: #d93025;
  --google-yellow: #f9ab00;
  --google-green: #1e8e3e;
  
  /* Typography Colors */
  --text-white: #111111;
  --text-primary: #202124;
  --text-dim: #5f6368;
  --text-muted: #80868b;
  
  /* Chromatic Grade Colors */
  --color-tier-s: #00a86b;
  --color-tier-a: #34a853;
  --color-tier-b: #fbbc04;
  --color-tier-c: #f9ab00;
  --color-tier-d: #fa7b17;
  --color-tier-e: #e65100;
  --color-tier-f: #ea4335;
  
  --dealbreaker-bg: rgba(234, 67, 53, 0.1);
  --dealbreaker-border: #ea4335;
  --dealbreaker-text: #d93025;

  /* Material Geometry */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;           /* Iconic Google Capsule */
  
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.55);
  --shadow-modal: 0 16px 40px rgba(0, 0, 0, 0.85);

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;

  --font-sans: "Google Sans", "Google Sans Text", Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 50% -80px, rgba(1, 135, 95, 0.08) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.035'/%3E%3C/svg%3E");
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Header & Navigation (Google Play Store Style)
   ========================================================================== */
header.site-header {
  background-color: #1e1f20;
  border-bottom: 1px solid #3c4043;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  color: #e3e3e3;
}
header.site-header * {
  color: #ffffff;
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo-img,
.brand-logo,
.brand-area img,
.brand-section img {
  height: 42px !important;
  width: auto !important;
  max-width: 200px !important;
  max-height: 42px !important;
  object-fit: contain !important;
  display: block !important;
}

.brand-icon-svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand-text-group {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.brand-google-tag {
  color: var(--text-dim);
  font-weight: 400;
}

.brand-tagline {
  display: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* YouTube Button Style */
.btn-youtube {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  background-color: #cc0000;
  color: #ffffff;
  border: 1px solid #cc0000;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-youtube:hover {
  background-color: #e60000;
  border-color: #e60000;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(204, 0, 0, 0.4);
}

.youtube-svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Google Play Console Button Style */
.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-admin:hover {
  background-color: var(--play-green);
  border-color: var(--play-green);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(1, 135, 95, 0.3);
}

.btn-metrics {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.95rem;
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-metrics:hover,
.btn-metrics.active {
  background-color: var(--play-green);
  border-color: var(--play-green);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(1, 135, 95, 0.3);
}

.btn-subscribe {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.95rem;
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-subscribe:hover {
  background-color: var(--play-green);
  border-color: var(--play-green);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(1, 135, 95, 0.3);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  background-color: var(--play-green);
  color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background-color: var(--play-green-hover);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(1, 135, 95, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.48rem 1.15rem;
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-focus);
  color: var(--play-green-light);
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
main.main-content {
  flex: 1;
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ==========================================================================
   Hero Banner (Google Play Featured Showcase Style)
   ========================================================================== */
.hero-banner {
  background: linear-gradient(135deg, #1e1f20 0%, #15221b 100%);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--play-green);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.hero-banner::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(1, 135, 95, 0.18), transparent 70%);
  pointer-events: none;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(1, 135, 95, 0.2);
  color: var(--play-green-light);
  border: 1px solid rgba(1, 135, 95, 0.4);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.hero-headline {
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  color: var(--text-dim);
  font-size: 0.92rem;
  max-width: 780px;
  line-height: 1.6;
}

/* ==========================================================================
   Filter & Search Panel (Google Play Store Style)
   ========================================================================== */
.website-description {
  text-align: center;
  color: #ffffff;
  background-color: #1e293b;
  font-size: clamp(0.7rem, 4vw, 1.1rem);
  font-weight: 500;
  padding: 0.6rem;
  border-radius: var(--radius-md);
  white-space: nowrap;
}

.filter-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-card);
}

/* Top Row: Google Play Capsule Search & Sort Controls */
.filter-top-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Google Play Pill Search Bar */
.search-box {
  flex: 1;
  min-width: 260px;
  position: relative;
}

.search-box input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.7rem 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: var(--play-green);
  background-color: #1e1f20;
  box-shadow: 0 0 0 3px rgba(1, 135, 95, 0.25);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-primary);
  font-size: 1rem;
  pointer-events: none;
}

/* Sort Controls */
.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sort-label {
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 500;
}

.sort-select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.sort-select:focus {
  border-color: var(--play-green);
}

.sort-direction-btn {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.55rem 0.9rem;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.sort-direction-btn:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--play-green);
}

/* ==========================================================================
   Category Selection Bar (Google Play Pills)
   ========================================================================== */
.quick-filters-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

.quick-filter-dropdown {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.btn-quick-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

.btn-quick-filter:hover {
  background: var(--bg-card-hover);
}

.quick-filter-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quick-filter-badge {
  background: var(--play-green);
  color: #fff;
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 12px;
  font-weight: 600;
}

.quick-filter-body {
  margin-top: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quick-filter-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-pill-action {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pill-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color);
}

.btn-pill-action:active {
  transform: scale(0.96);
}

.category-toggle-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.cat-chip {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.cat-chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.cat-chip.active {
  background: var(--play-green-tint);
  border-color: var(--play-green);
  color: var(--play-green-text);
  font-weight: 500;
}

.cat-chip-count {
  font-size: 0.65rem;
  opacity: 0.7;
}

@media (max-width: 600px) {
  .quick-filters-row {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    gap: 0.35rem;
  }
  .btn-quick-filter {
    font-size: 0.76rem;
    padding: 0.5rem;
  }
  .quick-filter-badge {
    font-size: 0.6rem;
  }
    .quick-filter-body {
      position: relative;
      top: 0;
      box-shadow: none;
    }
  }
  .filter-expand-bar {
    margin-top: 0.85rem;
    width: 100%;
  }
  .btn-filter-expand-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.15rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.85) 100%);
  color: #f1f5f9;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  user-select: none;
}

.btn-filter-expand-toggle:hover {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.85) 0%, rgba(30, 41, 59, 0.95) 100%);
  border-color: var(--play-green);
  color: #ffffff;
}

.btn-filter-expand-toggle.expanded {
  border-color: rgba(56, 189, 248, 0.4);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.85) 100%);
}

.filter-expand-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.filter-expand-icon {
  font-size: 1.05rem;
}

.filter-active-count-badge {
  background-color: var(--play-green);
  color: #0b1120;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
}

.filter-dropdown-triangle {
  font-size: 0.85rem;
  color: var(--play-green-light);
  transition: transform 0.25s ease;
}

.btn-filter-expand-toggle.expanded .filter-dropdown-triangle {
  color: #38bdf8;
}

.filter-collapsible-body {
  width: 100%;
  animation: fadeInFilter 0.25s ease;
}

@keyframes fadeInFilter {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.metric-filters-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  background-color: rgba(19, 19, 20, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
}

.metric-filter-block {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

/* Master Difficulty Filter Group */
.difficulty-filter-master-card {
  grid-column: 1 / -1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  color: #0f172a;
}

.difficulty-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
}

.nested-filter-submetrics-group {
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Submetrics Dropdown Toggle inside Difficulty */
.btn-submetrics-expand-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-submetrics-expand-toggle:hover {
  background: #e2e8f0;
  border-color: #38bdf8;
  color: #0f172a;
}

.submetrics-toggle-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.submetrics-toggle-icon {
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.9rem;
}

.submetrics-active-badge {
  background-color: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  margin-left: 0.35rem;
}

.submetrics-toggle-triangle {
  font-size: 0.8rem;
  color: #38bdf8;
  transition: transform 0.2s ease;
}

.nested-filter-submetrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.nested-filter-submetrics-grid.open {
  margin-top: 0.75rem;
}

.difficulty-filter-hint {
  font-size: 0.74rem;
  color: #94a3b8;
}

.nested-submetric-filter-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* 1-10 Range Filter Slider */
.metric-range-slider-wrap {
  position: relative;
  width: 100%;
  padding: 0.35rem 0.15rem 0.15rem 0.15rem;
  box-sizing: border-box;
}

.range-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.range-slider-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.range-slider-badge.is-filtered {
  background: #ecfdf5;
  color: #059669;
  border-color: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.2);
}

.range-slider-track-box {
  position: relative;
  width: 100%;
  height: 22px;
  display: flex;
  align-items: center;
}

.range-slider-track-bg {
  position: absolute;
  width: 100%;
  height: 6px;
  background: #cbd5e1;
  border-radius: 9999px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.range-slider-highlight {
  position: absolute;
  height: 6px;
  border-radius: 9999px;
  background: linear-gradient(to right, #ef4444 0%, #f97316 22%, #eab308 45%, #84cc16 70%, #22c55e 100%);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.3);
  pointer-events: none;
  transition: left 0.05s ease, width 0.05s ease;
}

.range-slider-input {
  position: absolute;
  width: 100%;
  height: 22px;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  z-index: 3;
}

.range-slider-input::-webkit-slider-runnable-track {
  background: transparent;
  border: 1px solid var(--border-color);
  height: 6px;
}

.range-slider-input::-moz-range-track {
  background: transparent;
  border: 1px solid var(--border-color);
  height: 6px;
}

.range-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #0f172a;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.8), 0 0 6px rgba(52, 211, 153, 0.6);
  cursor: pointer;
  pointer-events: auto;
  margin-top: -5px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.range-slider-input::-webkit-slider-thumb:hover,
.range-slider-input::-webkit-slider-thumb:active {
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.9);
}

.range-slider-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #0f172a;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.8), 0 0 6px rgba(52, 211, 153, 0.6);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.range-slider-input::-moz-range-thumb:hover,
.range-slider-input::-moz-range-thumb:active {
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.9);
}

.range-slider-input.active-thumb {
  z-index: 5;
}

.range-slider-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.35rem;
  user-select: none;
}

.range-step-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.15rem 0.2rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
  min-width: 18px;
  text-align: center;
}

.range-step-btn:hover {
  color: #f1f5f9;
  transform: scale(1.2);
}

.range-step-btn.in-range {
  font-weight: 700;
  color: #ffffff;
}

.range-step-btn.is-bound {
  font-weight: 900;
  transform: scale(1.2);
  text-shadow: 0 0 6px currentColor;
}

/* Multi-Dot Metric Filter Slider (Preserved for backwards-compatibility) */
.metric-filter-slider-wrap {
  position: relative;
  width: 100%;
  padding: 0.5rem 0.25rem 0.2rem 0.25rem;
  box-sizing: border-box;
}

.filter-slider-track {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, #ef4444 0%, #f97316 22%, #eab308 45%, #84cc16 70%, #22c55e 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  touch-action: none;
}

.filter-slider-dots-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.slider-bump-dot {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #0b1120;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  z-index: 5;
}

.slider-bump-dot:hover {
  transform: translate(-50%, -50%) scale(1.3);
}

.filter-slider-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.45rem;
  user-select: none;
}

.slider-step-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.2rem;
  font-size: 0.74rem;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s, transform 0.15s, font-weight 0.15s;
  min-width: 18px;
  text-align: center;
}

.slider-step-btn:hover {
  color: #f1f5f9;
  transform: scale(1.2);
}

.slider-step-btn.active {
  font-weight: 800;
  transform: scale(1.2);
  text-shadow: 0 0 6px currentColor;
}

.metric-filter-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f172a; /* Dark text for light background */
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
}

/* Category Icons */
.metric-category-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  margin-right: 0.5rem;
  display: inline-block;
}

.metric-chip-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  margin-right: 0.35rem;
}

.cat-chip-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  margin-right: 0.4rem;
}

.metric-filter-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  margin-right: 0.45rem;
}

.modal-metric-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  margin-right: 0.4rem;
}

.admin-metric-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Homepage Game Card Category Metrics Strip */
.game-card-metrics-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.3rem 0.5rem;
  padding: 0.6rem 3.2rem 0.6rem 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background-color: transparent;
}

.game-card-text-metric-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.75rem;
}

.game-card-text-label {
  color: #94a3b8;
}

.game-card-text-score {
  font-weight: 900;
}

/* Game Card Review Summary Snippet */
.game-card-description {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.4;
  padding: 0 1.1rem 0.65rem 1.1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.73rem;
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1.5px solid currentColor;
  white-space: nowrap;
}

/* Enlarged Difficulty Metric Pill */
.card-metric-pill.pill-difficulty {
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.28rem 0.65rem;
  border-width: 2px;
  background-color: rgba(0, 0, 0, 0.6) !important;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.card-metric-pill.pill-difficulty .card-metric-icon {
  width: 17px;
  height: 17px;
}

.card-metric-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex-shrink: 0;
}

.card-metric-pill.unit-red {
  color: #f87171 !important;
  border-color: #ea4335 !important;
  background-color: rgba(234, 67, 53, 0.12) !important;
}

.card-metric-pill.unit-yellow {
  color: #fde047 !important;
  border-color: #fbbc04 !important;
  background-color: rgba(251, 188, 4, 0.12) !important;
}

.card-metric-pill.unit-green {
  color: #34d399 !important;
  border-color: #00a86b !important;
  background-color: rgba(1, 135, 95, 0.15) !important;
}

.card-metric-pill.unit-blue {
  color: #8ab4f8 !important;
  border-color: #8ab4f8 !important;
  background-color: rgba(138, 180, 248, 0.12) !important;
}

.card-metric-pill.unit-compound {
  color: #c084fc !important;
  border-color: rgba(192, 132, 252, 0.6) !important;
  background-color: rgba(192, 132, 252, 0.12) !important;
}

.metric-value-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
}

.val-chip {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  color: var(--text-primary);
}

/* Inactive states: Only the border is in the specific color, text is neutral */
.val-chip.unit-red {
  border-color: #ea4335;
  color: var(--text-dim);
}

.val-chip.unit-yellow {
  border-color: #fbbc04;
  color: var(--text-dim);
}

.val-chip.unit-green {
  border-color: #00a86b;
  color: var(--text-dim);
}

.val-chip.unit-blue {
  border-color: #8ab4f8;
  color: var(--text-dim);
}

.val-chip.unit-neutral {
  border-color: var(--border-color);
  color: var(--text-dim);
}

/* Active / Selected states: Both border and text are in the specific color, with background tint */
.val-chip.unit-red.active {
  border-color: #ea4335;
  color: #f87171;
  background-color: rgba(234, 67, 53, 0.18);
  box-shadow: 0 0 8px rgba(234, 67, 53, 0.35);
  filter: brightness(1.1);
}

.val-chip.unit-yellow.active {
  border-color: #fbbc04;
  color: #fde047;
  background-color: rgba(251, 188, 4, 0.18);
  box-shadow: 0 0 8px rgba(251, 188, 4, 0.35);
  filter: brightness(1.1);
}

.val-chip.unit-green.active {
  border-color: #00a86b;
  color: #34d399;
  background-color: rgba(1, 135, 95, 0.22);
  box-shadow: 0 0 8px rgba(1, 135, 95, 0.35);
  filter: brightness(1.1);
}

.val-chip.unit-blue.active {
  border-color: #8ab4f8;
  color: #8ab4f8;
  background-color: rgba(138, 180, 248, 0.18);
  box-shadow: 0 0 8px rgba(138, 180, 248, 0.35);
  filter: brightness(1.1);
}

.val-chip:hover {
  filter: brightness(1.2);
}

/* Active Filter Summary */
.active-filters-summary {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}

.filter-tags-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
}

.filter-badge {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-badge button {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}

.filter-badge button:hover {
  color: var(--google-red);
}

.btn-clear-all {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--google-red);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

/* ==========================================================================
   Games Grid & Public Game Cards (Google Play Store App Card Style)
   STRICT REQUIREMENT: ONLY IMAGE, NAME, AND OVERALL SCORE
   ========================================================================== */
.games-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.results-count {
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
}

.games-notice {
  color: #555555;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 0.35rem;
  margin-bottom: 1.25rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

/* Google Play Store Game Card */
.game-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-card);
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--play-green-light);
  box-shadow: var(--shadow-hover);
  background-color: var(--bg-card-hover);
}

.game-card-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  position: relative;
  background-color: #121212;
  overflow: hidden;
}

.game-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.game-card:hover .game-card-img {
  transform: scale(1.04);
}

.game-card-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.game-card-body {
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background-color: var(--bg-card);
}

.game-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.game-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
}

.game-card-genre {
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card-price-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.78rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--play-green-light);
  white-space: nowrap;
  flex-shrink: 0;
}

.game-card-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--play-green-light);
  flex-shrink: 0;
}

/* ==========================================================================
   Detailed View Modal (Google Play Store Game Detail Sheet)
   ========================================================================== */
dialog#gameModal {
  max-width: 820px;
  width: 92vw;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-primary);
  padding: 0;
  margin: auto;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  outline: none;
}

dialog#gameModal::backdrop {
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.modal-content-wrapper {
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Google Play Detail Header Banner */
.modal-header-banner {
  position: relative;
  height: 240px;
  background-color: #111111;
  overflow: hidden;
}

.modal-cover-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4) blur(3px);
  transform: scale(1.08);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.modal-close-btn:hover {
  background: var(--google-red);
  border-color: var(--google-red);
}

/* Google Play Header Info Area */
.modal-header-info {
  position: absolute;
  bottom: 1.25rem;
  left: 1.5rem;
  right: 1.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.modal-title-group h2 {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  letter-spacing: -0.02em;
}

.modal-developer-link {
  color: var(--play-green-light);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

.modal-meta-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.modal-meta-tag {
  background: rgba(30, 31, 32, 0.85);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
}

/* Google Play Rating Score Column */
.modal-score-badge-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(30, 31, 32, 0.95);
  border: 2px solid currentColor;
  border-radius: var(--radius-md);
  padding: 0.6rem 1.1rem;
  min-width: 95px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.modal-score-num {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.modal-score-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-top: 0.3rem;
}

/* Modal Body */
.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background-color: var(--bg-surface);
}

/* Google Play Dealbreaker Banner */
.dealbreaker-banner {
  background-color: var(--dealbreaker-bg);
  border: 1px solid var(--dealbreaker-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--dealbreaker-text);
  font-size: 0.88rem;
}

.dealbreaker-banner strong {
  color: #ffffff;
}

/* Gameplay Review Box (About This Game Style) */
.review-text-section {
  background-color: #232527;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.review-text-header {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff; /* STRICT WHITE HEADER */
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.review-body-p {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* Gameplay Video Section (YouTube Gameplay Space) */
.gameplay-video-section {
  background-color: #232527;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.gameplay-video-header {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.youtube-inline-icon {
  width: 20px;
  height: 20px;
  fill: #ff0000;
  flex-shrink: 0;
}

.video-responsive-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #000000;
  border: 1px solid var(--border-color);
}

.video-responsive-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid var(--border-color);
}

.video-fallback-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.08), rgba(30, 31, 32, 0.8));
  border: 1px dashed rgba(255, 0, 0, 0.35);
  border-radius: var(--radius-md);
}

.video-fallback-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.video-fallback-icon {
  font-size: 1.75rem;
}

.video-fallback-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.video-fallback-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

.btn-youtube-watch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.15rem;
  background-color: #cc0000;
  color: #ffffff;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-youtube-watch:hover {
  background-color: #e60000;
  box-shadow: 0 4px 12px rgba(230, 0, 0, 0.45);
  color: #ffffff;
}

/* Metric Sections: Game Profile & Quality Score */
.metrics-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.section-heading {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary); /* Pure White Category Group Heading */
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.45rem;
}

.metrics-grid-2col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.85rem;
}

.metric-card {
  background-color: #232527;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
}

/* STRICT COLOR CODING REQUIREMENT:
   The name of the category will be in color white.
   The color coding can apply only to the result. */
.metric-name {
  color: #ffffff !important; /* STRICT WHITE CATEGORY NAME */
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-desc-mini {
  font-size: 0.72rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.metric-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
}

.metric-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid currentColor;
  background: rgba(0, 0, 0, 0.4);
}

.metric-curve-badge {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.metric-curve-icon {
  font-weight: 800;
}

/* Google Play Pass Value Box */
.playpass-value-box {
  background: linear-gradient(135deg, rgba(1, 135, 95, 0.12), rgba(66, 133, 244, 0.1));
  border: 1px solid rgba(1, 135, 95, 0.4);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.playpass-label {
  color: #ffffff !important; /* Category name in pure white */
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.playpass-formula {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

.playpass-result {
  font-size: 1.15rem;
  font-weight: 800;
}

/* Tech Specifications Grid (Offline Playability, Orientation) */
.tech-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
}

.tech-card {
  background-color: #232527;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tech-card-label {
  color: #ffffff !important; /* Category name in pure white */
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tech-card-val {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid currentColor;
}

/* ==========================================================================
   Chromatic Color Coding Classes (Green to Red)
   ========================================================================== */
.color-tier-s, .score-s, .grade-s {
  color: var(--color-tier-s) !important;
}
.color-tier-a, .score-a, .grade-a {
  color: var(--color-tier-a) !important;
}
.color-tier-b, .score-b, .grade-b {
  color: var(--color-tier-b) !important;
}
.color-tier-c, .score-c, .grade-c {
  color: var(--color-tier-c) !important;
}
.color-tier-d, .score-d, .grade-d {
  color: var(--color-tier-d) !important;
}
.color-tier-e, .score-e, .grade-e {
  color: var(--color-tier-e) !important;
}
.color-tier-f, .score-f, .grade-f {
  color: var(--color-tier-f) !important;
}

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-primary);
  font-size: 0.8rem;
  margin-top: 2rem;
  background-color: var(--bg-surface);
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsive Engine
   ========================================================================== */
@media (max-width: 768px) {
  /* Header: Single compact row on mobile */
  .header-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    gap: 0.5rem;
  }
  .brand-logo-img, .brand-logo, .brand-area img {
    height: 32px !important;
    max-height: 32px !important;
  }
  .brand-title {
    font-size: 1.05rem;
    white-space: nowrap;
  }
  .header-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }
  .btn-youtube span, .btn-admin span:not(:first-child), .btn-metrics span:not(:first-child), .btn-subscribe span:not(:first-child) {
    display: none; /* Icon-only buttons for sleek mobile navigation */
  }
  .btn-youtube, .btn-admin, .btn-metrics, .btn-subscribe {
    padding: 0.4rem 0.65rem;
    font-size: 0.85rem;
  }

  /* Main Content: Proper mobile padding - remove bulky side gaps */
  .main-content {
    padding: 0.65rem 0.25rem 2rem 0.25rem;
  }

  /* Filter Panel on Mobile: Compact vertical spacing, remove side frames and gaps */
  .filter-panel {
    padding: 0.65rem 0.2rem;
    border-left: none;
    border-right: none;
    border-radius: 0;
    margin-bottom: 0.85rem;
    gap: 0.5rem;
  }
  .filter-top-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  .search-box {
    width: 100%;
  }
  .search-box input {
    font-size: 0.86rem;
    padding: 0.48rem 0.85rem;
  }
  .sort-controls {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
  }
  .sort-label {
    font-size: 0.78rem;
  }
  .sort-select {
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
    padding: 0.38rem 0.65rem;
  }
  .sort-direction-btn {
    padding: 0.38rem 0.65rem;
    font-size: 0.78rem;
  }

  /* Filter Collapsible Bar & Toggle on Mobile */
  .filter-expand-bar {
    margin-top: 0.35rem;
  }
  .btn-filter-expand-toggle {
    padding: 0.5rem 0.75rem;
    font-size: 0.84rem;
  }

  /* Category selection: Silky horizontal scrollbar, compact spacing */
  .category-selection-bar {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    gap: 0.35rem;
  }
  .category-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
  }
  .category-selection-title {
    font-size: 0.76rem;
  }
  .category-actions {
    gap: 0.3rem;
  }
  .btn-pill-action {
    font-size: 0.7rem;
    padding: 0.18rem 0.5rem;
  }
  .category-toggle-chips {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.35rem;
    padding-bottom: 0.25rem;
  }
  .category-toggle-chips::-webkit-scrollbar {
    display: none;
  }
  .cat-chip {
    flex-shrink: 0;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
  }

  /* Metric Value Filters on Mobile: Completely remove frames and side gaps, display all at once, compress top/bottom */
  .metric-filters-container {
    grid-template-columns: 1fr !important;
    gap: 0.35rem !important;
    padding: 0.25rem 0 !important;
    max-height: none !important;
    overflow-y: visible !important;
    overflow: visible !important;
    -webkit-overflow-scrolling: auto;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Difficulty Filter Master Card on Mobile: Seamless, no side frames/gaps */
  .difficulty-filter-master-card {
    background: #f8fafc !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    border-top: 1px solid #e2e8f0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 0.45rem 0.15rem !important;
    gap: 0.3rem !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .difficulty-filter-header {
    gap: 0.2rem !important;
    padding: 0 4px !important;
  }

  .nested-filter-submetrics-group {
    margin-top: 0.35rem !important;
    padding-top: 0.35rem !important;
    gap: 0.35rem !important;
  }

  .btn-submetrics-expand-toggle {
    padding: 0.42rem 0.65rem !important;
    font-size: 0.78rem !important;
  }

  .nested-filter-submetrics-grid {
    grid-template-columns: 1fr !important;
    gap: 0.35rem !important;
    padding: 0 !important;
    margin-top: 0.35rem !important;
  }

  .nested-submetric-filter-item {
    background: #ffffff !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    border-top: 1px solid #e2e8f0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 0.35rem 0.15rem !important;
    gap: 0.2rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    color: #0f172a !important;
  }

  .metric-filter-block {
    background: transparent !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 0.35rem 0.15rem !important;
    gap: 0.2rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .metric-filter-title {
    padding: 0 4px !important;
    font-size: 0.74rem !important;
  }

  /* Multi-Dot Slider on Mobile: Tiny gap on both sides of measurement unit line */
  .metric-filter-slider-wrap {
    padding: 0.25rem 6px 0.15rem 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .filter-slider-steps {
    padding: 0 4px !important;
    margin-top: 0.2rem !important;
  }

  .slider-step-btn {
    min-width: 16px !important;
    padding: 0.1rem 0 !important;
    font-size: 0.72rem !important;
  }

  .active-filters-summary {
    margin-top: 0.35rem !important;
    padding-top: 0.35rem !important;
  }

  /* Games Grid on Mobile: Clean single-column app cards */
  .games-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  .game-card {
    flex-direction: row;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  .game-card-media {
    width: 120px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    border-right: 1px solid var(--border-color);
  }
  .game-card-body {
    padding: 0.6rem 0.85rem;
  }
  .game-card-title {
    font-size: 1.05rem;
  }
  
  /* Squeeze metric pills on each card so they fit without scrolling */
  .game-card-metrics-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    padding: 0.4rem 0.5rem !important;
    gap: 0.2rem 0.4rem !important;
    justify-content: start !important;
  }
  .game-card-metrics-row::-webkit-scrollbar {
    display: none;
  }
  .card-metric-pill {
    flex-shrink: 1;
  }

  /* Position love heart button at top-right on mobile cards so it doesn't overlap metric scores */
  .game-card-heart-btn {
    top: 0.75rem !important;
    bottom: auto !important;
    right: 0.75rem !important;
  }
}

/* ==========================================================================
   DEDICATED GAME SCORECARD PAGE & GOOGLE PLAY MEDIA STYLING
   ========================================================================== */

body.game-page-body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

.game-page-main {
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem 1.25rem;
  box-sizing: border-box;
  overflow-x: hidden;
}

.game-article {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.game-hero-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: visible;
  margin-bottom: 1.75rem;
  max-width: 100%;
  box-sizing: border-box;
}







.game-identity-row {
  display: flex;
  gap: 1.75rem;
  padding: 2rem;
  margin-top: 0;
  position: relative;
  z-index: 2;
}

.game-icon-large {
  width: 130px;
  height: 130px;
  border-radius: 26px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
  border: 1px solid var(--border-color);
  background-color: #000000;
  flex-shrink: 0;
}

.game-identity-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.game-page-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.2;
}

.game-page-dev-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.game-dev-name {
  color: var(--google-blue);
  font-weight: 600;
}

.game-genre-tag {
  background-color: rgba(0, 0, 0, 0.06);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.game-badges-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
  width: 100%;
}
.game-badges-strip > * {
  white-space: nowrap;
  font-size: clamp(0.55rem, 2.5vw, 0.85rem) !important;
  padding: 0.25rem 0.5rem !important;
}
.playstore-svg {
  width: clamp(12px, 2.5vw, 15px);
  height: clamp(12px, 2.5vw, 15px);
}

/* Google Play Rating Chip */
.gp-rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #facc15;
}

.gp-rating-chip .gp-star-icon {
  font-size: 1rem;
}

.gp-rating-label {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
  margin-left: 0.25rem;
}

/* Meta Badges / Chips for Game Identity Header */
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

.meta-chip strong {
  color: var(--text-primary);
  font-weight: 700;
}

.game-dot-separator {
  color: var(--text-primary);
  font-size: 0.9rem;
}

.game-icon-wrapper {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
}

/* Card Google Play Rating Badge (Replaces Price on Homepage Cards) */
.game-card-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #facc15;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
}

.game-card-rating-badge .star {
  font-size: 0.85rem;
}

/* Google Play Link Button */
.btn-playstore {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #01875f;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color var(--transition-fast);
}

.btn-playstore:hover {
  background-color: #016849;
}

/* Section Cards on Game Page */
.game-section-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.section-subtitle {
  font-size: 0.82rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Google Play Horizontal Media Strip */
.gp-media-scroll-wrapper {
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: #3b3e42 transparent;
}

.gp-media-scroll-wrapper::-webkit-scrollbar {
  height: 8px;
}

.gp-media-scroll-wrapper::-webkit-scrollbar-thumb {
  background-color: #3b3e42;
  border-radius: 4px;
}

.gp-media-strip {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.gp-media-card {
  height: 240px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: #0f1011;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.gp-media-card:hover {
  transform: translateY(-4px);
  border-color: #38bdf8;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.gp-trailer-card {
  width: 400px;
  position: relative;
}

.gp-trailer-thumb-box {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gp-trailer-thumb-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.gp-trailer-play-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(1, 135, 95, 0.9);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  position: relative;
  z-index: 2;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  transition: transform var(--transition-fast);
}

.gp-trailer-card:hover .gp-trailer-play-icon {
  transform: scale(1.12);
  background-color: #01a373;
}

.gp-trailer-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  text-transform: uppercase;
}

.gp-screenshot-img {
  height: 240px;
  width: auto;
  display: block;
  object-fit: cover;
}

/* Gameplay Proof Video Highlight (Main Proof Focus) */
.gameplay-proof-highlight {
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: linear-gradient(180deg, #1c232c 0%, var(--bg-surface) 100%);
}

.proof-badge {
  background-color: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.proof-explanation {
  font-size: 0.95rem;
  color: #cbd5e1;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.video-responsive-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
  background-color: #000000;
}

.video-responsive-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Scorecard Grid */
.scorecard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.scorecard-grid .metric-card {
  background-color: #373a40;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.4rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.scorecard-grid .metric-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.metric-card-top {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 0.65rem !important;
  width: 100%;
  box-sizing: border-box;
}

.metric-name {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.25;
}

.metric-desc {
  font-size: 0.78rem;
  color: var(--text-primary);
  line-height: 1.45;
}

.metric-badge {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  min-width: 72px;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid currentColor;
  box-sizing: border-box;
}

.badge-low,
.badge-easy {
  color: #f87171 !important;
  border-color: rgba(248, 113, 113, 0.4) !important;
  background-color: rgba(248, 113, 113, 0.12) !important;
}

.badge-medium,
.badge-med {
  color: #facc15 !important;
  border-color: rgba(250, 204, 21, 0.4) !important;
  background-color: rgba(250, 204, 21, 0.12) !important;
}

.badge-hard,
.badge-high {
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
  background-color: rgba(52, 211, 153, 0.12) !important;
}

/* Compound & Multi-Measurement Badges */
.badge-easy-hard,
.badge-easy---hard,
.badge-easy-to-hard,
.badge-low-hard,
.badge-low---hard,
.badge-low-high,
.badge-low---high,
.badge-low-to-high,
.badge-low-medium,
.badge-low---medium,
.badge-medium-hard,
.badge-medium---hard,
.badge-medium-high,
.badge-medium---high {
  color: #c084fc !important;
  border-color: rgba(192, 132, 252, 0.4) !important;
  background-color: rgba(192, 132, 252, 0.12) !important;
}

/* Reviewer Metric Observation Bubble */
.metric-comment-bubble {
  background-color: rgba(1, 135, 95, 0.08);
  border-left: 3px solid var(--play-green-light);
  border-radius: 4px;
  padding: 0.45rem 0.65rem;
  margin: 0.35rem 0;
  font-size: 0.82rem;
  color: #ffffff;
  line-height: 1.45;
  font-style: italic;
}

.quality-grade-card {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 800;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid currentColor;
}

.grade-s {
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
  background-color: rgba(52, 211, 153, 0.12) !important;
}

.grade-a {
  color: #86efac !important;
  border-color: rgba(134, 239, 172, 0.4) !important;
  background-color: rgba(134, 239, 172, 0.12) !important;
}

.grade-b {
  color: #fde047 !important;
  border-color: rgba(253, 224, 71, 0.4) !important;
  background-color: rgba(253, 224, 71, 0.12) !important;
}

.grade-c {
  color: #fdba74 !important;
  border-color: rgba(253, 186, 116, 0.4) !important;
  background-color: rgba(253, 186, 116, 0.12) !important;
}

.grade-d,
.grade-e,
.grade-f {
  color: #f87171 !important;
  border-color: rgba(248, 113, 113, 0.4) !important;
  background-color: rgba(248, 113, 113, 0.12) !important;
}

/* Loading Spinner */
.loading-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--play-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.metric-curve-row {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.curve-label {
  color: #94a3b8;
}

.curve-val {
  font-weight: 700;
  color: #38bdf8;
}

.gameplay-verdict-box {
  background-color: #171819;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.verdict-body-text {
  font-size: 1rem;
  line-height: 1.75;
  color: #ffffff;
  white-space: pre-line;
}

/* ==========================================================================
   Master Difficulty & Nested Submetrics (Exponential Mean)
   ========================================================================== */
.difficulty-master-card {
  grid-column: 1 / -1;
  background: #373a40 !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  border-radius: var(--radius-md);
  padding: 1.25rem !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.difficulty-master-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.difficulty-master-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.difficulty-tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid currentColor;
}

.difficulty-score-badge {
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  background-color: rgba(56, 189, 248, 0.12) !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
}

.difficulty-calc-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0.5rem 0 0.85rem 0;
  line-height: 1.45;
}

/* Nested Submetrics Grid on Dedicated Game Page */
.nested-submetrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.nested-submetric-card {
  background: #2a2d33;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.45rem;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.nested-submetric-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(15, 23, 42, 0.9);
}

.nested-submetric-top {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 0.5rem !important;
  width: 100%;
  box-sizing: border-box;
}

.submetric-category-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  margin-right: 0.45rem;
}

/* Modal Master Difficulty & Nested Submetrics */
.difficulty-master-modal-card {
  grid-column: 1 / -1;
  background: #373a40 !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
}

.difficulty-master-modal-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 0.5rem !important;
}

.difficulty-nested-explainer { font-size: 0.78rem; color: #ffffff; background-color: #000000; padding: 0.4rem 0.6rem; border-radius: 4px; margin: 0.4rem 0 0.75rem 0; }

.nested-submetrics-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.4rem;
}

.nested-submetric-modal-item {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.submetric-title-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-width: 0;
}

.submetric-badges-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.modal-submetric-icon, .submetric-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
}

.submetric-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.25;
}

/* ==========================================================================
   1-10 Scale Spectrum Line & Raised Bump Indicator
   ========================================================================== */
.metric-scale-line-container {
  width: 100%;
  margin: 0.45rem 0 0.25rem 0;
  box-sizing: border-box;
}

.metric-scale-track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, #ef4444 0%, #f97316 22%, #eab308 45%, #84cc16 70%, #22c55e 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
}

.metric-scale-bump {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #0b1120;
  box-sizing: border-box;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
  z-index: 2;
  cursor: default;
}

.metric-scale-bump:hover {
  transform: translate(-50%, -50%) scale(1.2);
}

.metric-scale-range {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.3rem;
  font-variant-numeric: tabular-nums;
  user-select: none;
  line-height: 1;
  width: 100%;
}

.metric-scale-range .scale-min {
  font-weight: 600;
  opacity: 0.7;
  min-width: 24px;
  text-align: left;
}

.metric-scale-range .scale-max {
  font-weight: 600;
  opacity: 0.7;
  min-width: 24px;
  text-align: right;
}

.metric-scale-range .scale-current {
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-align: center !important;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Master Difficulty Spectrum Bar */
.difficulty-master-card .metric-scale-line-container {
  margin: 0.75rem 0 0.85rem 0;
  background: rgba(15, 23, 42, 0.4);
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.difficulty-master-modal-card .metric-scale-line-container {
  margin: 0.6rem 0 0.85rem 0;
  background: rgba(15, 23, 42, 0.4);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Lightbox Dialog */
.lightbox-dialog {
  border: 1px solid var(--border-color);
  background: transparent;
  padding: 0;
  max-width: 95vw;
  max-height: 95vh;
}

.lightbox-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
}

.lightbox-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
  object-fit: contain;
}

.lightbox-close-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #27272a;
  color: #ffffff;
  border: 2px solid #52525b;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast);
}

.lightbox-close-btn:hover {
  background-color: #ef4444;
  border-color: #ef4444;
}

/* ==========================================================================
   METRICS & EVALUATION RUBRIC PAGE STYLING
   ========================================================================== */
.metrics-page-main {
  max-width: 1100px;
}

.metrics-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-left: 4px solid var(--play-green);
  padding: 1.75rem 2rem;
}

.metrics-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(1, 135, 95, 0.2);
  color: var(--play-green-light);
  border: 1px solid rgba(1, 135, 95, 0.4);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.metrics-hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.metrics-hero-subtitle {
  color: #cbd5e1;
  font-size: 0.94rem;
  line-height: 1.6;
  max-width: 820px;
}

/* Formula & Math Display */
.formula-content-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.formula-intro-text {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.6;
}

.math-formula-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.formula-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #38bdf8;
  margin-bottom: 0.6rem;
}

.math-display {
  font-family: "Google Sans", Roboto, monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.5;
  word-break: break-word;
}

.math-var {
  color: #38bdf8;
  font-weight: 800;
}

.bottleneck-explainer-card {
  background: rgba(24, 24, 27, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.6;
}

.explainer-heading {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.code-inline {
  background: rgba(0, 0, 0, 0.4);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85rem;
}

/* Interactive Calculator */
.interactive-calc-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.calc-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.calc-icon {
  font-size: 1.6rem;
}

.calc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.calc-subtitle {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

.calc-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.calc-control-group {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.calc-control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calc-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f1f5f9;
}

.calc-val-badge {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0b1120;
  background-color: var(--play-green);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  min-width: 24px;
  text-align: center;
}

.calc-range-slider {
  width: 100%;
  accent-color: var(--play-green);
  cursor: pointer;
}

.calc-range-minmax {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
}

.calc-result-box {
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1rem;
}

.calc-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.breakdown-line {
  font-size: 0.84rem;
  color: #cbd5e1;
  font-family: monospace;
}

.breakdown-sub {
  font-size: 0.78rem;
  color: #94a3b8;
}

.calc-final-score-group {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.calc-final-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  font-weight: 700;
}

.calc-final-num {
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--play-green-light);
}

.calc-final-tier {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Rubric Breakdown Cards */
.rubric-section-desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.rubric-block {
  margin-bottom: 2rem;
}

.rubric-block:last-child {
  margin-bottom: 0;
}

.rubric-metric-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.rubric-metric-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-bottom: 0.85rem;
}

.rubric-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.rubric-item-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: rgba(30, 31, 32, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.rubric-item-row:hover {
  background: rgba(30, 31, 32, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
}

.rubric-badge-col {
  flex-shrink: 0;
  width: 32px;
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

.rubric-score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.78rem;
  border: 2px solid transparent;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.rubric-desc-col {
  flex: 1;
  min-width: 0;
}

.rubric-desc-text {
  font-size: 0.86rem;
  color: #ffffff;
  line-height: 1.45;
}

.rubric-item-title {
  color: #ffffff;
  font-weight: 700;
}

.rubric-examples-list {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-top: 0.45rem;
  padding-left: 0.5rem;
  border-left: 2px solid rgba(56, 189, 248, 0.35);
  margin-left: 0.1rem;
}

.rubric-example-item {
  font-size: 0.8rem;
  color: #ffffff;
  line-height: 1.4;
}

.rubric-example-tag {
  color: #38bdf8;
  font-weight: 600;
  margin-right: 0.3rem;
}

/* Quality & Tech Cards */
.quality-rubric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.quality-card {
  background: rgba(30, 31, 32, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quality-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.quality-header h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
}

.quality-desc {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.5;
}

@media (max-width: 768px) {
  /* Game Page Container Constraints */
  body.game-page-body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  .game-page-main {
    padding: 0.5rem 0.25rem 2.5rem 0.25rem;
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .game-article {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  /* Section Cards on Mobile: Remove bulky side frames and gaps */
  .game-section-card {
    padding: 0.85rem 0.2rem;
    border-left: none;
    border-right: none;
    border-radius: 0;
    margin-bottom: 0.85rem;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  /* Section Title Row: Stack vertically on mobile to prevent wide horizontal overflow */
  .section-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    padding: 0 4px 0.4rem 4px;
  }

  .section-title {
    font-size: 1.1rem;
    line-height: 1.3;
    flex-wrap: nowrap;
    gap: 0.4rem;
  }

  .section-subtitle, .proof-badge {
    font-size: 0.72rem;
    align-self: flex-start;
  }

  /* Hero Banner & App Identity on Mobile */
  .game-hero-card {
    border-radius: 14px;
    margin-bottom: 1rem;
    max-width: 100%;
    box-sizing: border-box;
          overflow: hidden;
    }

    .game-identity-row {
      flex-direction: column;
      align-items: center;
      text-align: center;
      margin-top: 0;
      padding: 1.25rem 0.85rem;
      gap: 0.75rem;
      width: 100%;
      box-sizing: border-box;
    }

    .game-icon-large {
      width: 80px;
      height: 80px;
      border-radius: 18px;
      border: 1px solid var(--border-color);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    }

    .game-identity-details {
      width: 100%;
    }
  }

  /* Extra small devices (iPhone SE, smaller Android phones) */
@media (max-width: 480px) {
  .brand-title {
    font-size: 0.95rem;
  }
  .game-page-title {
    font-size: 1.25rem;
  }
  .game-icon-large {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }
  .game-card-title {
      font-size: 0.98rem;
    }
  }

  /* ==========================================================================
     Subscription System & Email Alerts UI
   ========================================================================== */

/* Subtle Inline Alert Trigger (Games Section Header) */
.btn-subtle-alerts {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-subtle-alerts:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--play-green);
  color: var(--text-primary);
}

/* Subscription Modal Dialog */
dialog.sub-modal {
  max-width: 620px;
  width: 92vw;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  padding: 0;
  margin: auto;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  outline: none;
}

dialog.sub-modal::backdrop {
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.sub-modal-content {
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sub-modal-header {
  position: relative;
  padding: 1.15rem 1.4rem;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.sub-modal-title-group h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sub-modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-primary);
  margin-top: 0.2rem;
  line-height: 1.4;
}

.sub-modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

/* Logged Out Screen */
.sub-login-card {
  background-color: #232527;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

.sub-perks-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
  width: 100%;
  margin-top: 0.5rem;
}

.sub-perk-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.sub-perk-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.sub-google-btn-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 0.5rem;
}

/* User Profile Chip Bar */
.sub-user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background-color: #25282a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.sub-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.sub-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--play-green);
  flex-shrink: 0;
  background-color: #333;
}

.sub-user-meta {
  min-width: 0;
}

.sub-user-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-user-email {
  font-size: 0.76rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-user-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-sub-switch {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-sub-switch:hover {
  border-color: #f87171;
  color: #f87171;
}

/* Status & Mode Switcher */
.sub-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}

.sub-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid currentColor;
}

.sub-status-active {
  color: #34d399;
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.4);
}

.sub-status-paused {
  color: #fde047;
  background: rgba(253, 224, 71, 0.15);
  border-color: rgba(253, 224, 71, 0.4);
}

.sub-mode-toggle {
  display: inline-flex;
  background-color: var(--bg-input);
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  gap: 2px;
}

.sub-mode-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.sub-mode-btn.active {
  background-color: var(--play-green);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Criteria Customizer Box */
.sub-criteria-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #232527;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.sub-criteria-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.65rem;
}

.sub-criteria-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sub-criteria-hint {
  font-size: 0.78rem;
  color: var(--text-primary);
}

.sub-criteria-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sub-criteria-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sub-criteria-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sub-badge-val,
.sub-badge-val.story-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--play-green-tint);
  border: 1px solid rgba(1, 135, 95, 0.4);
  color: var(--play-green-light);
}

/* Pills row */
.sub-pill-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
}

.sub-pill {
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-color);
  color: var(--text-dim);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  user-select: none;
}

.sub-pill:hover {
  border-color: var(--play-green-light);
  color: var(--text-primary);
}

.sub-pill.active,
.sub-pill.highlight.active {
  background-color: var(--play-green-tint);
  border-color: var(--play-green);
  color: var(--play-green-text);
  box-shadow: 0 0 6px rgba(1, 135, 95, 0.25);
}

/* Toggle Switches */
.sub-switches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.sub-switch-card {
  background-color: #1e1f20;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s;
}

.sub-switch-card:hover {
  border-color: var(--text-primary);
}

.sub-switch-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--play-green);
  cursor: pointer;
}

.sub-switch-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sub-switch-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
}

.sub-switch-desc {
  font-size: 0.72rem;
  color: var(--text-primary);
}

/* Action Area */
.sub-actions-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.sub-actions-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.75rem;
}

.btn-sub-save {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.35rem;
  background-color: var(--play-green);
  color: #ffffff;
  border: 1px solid var(--play-green);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.btn-sub-save:hover {
  background-color: var(--play-green-hover);
  border-color: var(--play-green-hover);
  transform: translateY(-1px);
}

.btn-sub-test {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  background-color: var(--bg-input);
  color: var(--text-dim);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-sub-test:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--play-green);
  color: var(--text-primary);
}

.btn-sub-pause {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-sub-pause:hover {
  border-color: #fbbc04;
  color: #fbbc04;
}

.sub-status-toast {
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  display: none;
  animation: fadeIn 0.2s ease;
}

.sub-status-toast.success {
  display: block;
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid #34d399;
  color: #34d399;
}

.sub-status-toast.info {
  display: block;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #38bdf8;
}

.sub-status-toast.error {
  display: block;
  background: rgba(234, 67, 53, 0.15);
  border: 1px solid #ea4335;
  color: #fca5a5;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  dialog.sub-modal {
    width: 100vw !important;
    max-width: 100vw !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }
  .sub-modal-body {
    padding: 1rem 0.85rem !important;
    gap: 1rem !important;
  }
  .sub-actions-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-sub-save, .btn-sub-test, .btn-sub-pause {
    width: 100%;
    justify-content: center;
  }
  .game-social-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }
  .social-share-group {
    justify-content: space-between;
  }
}

/* ==========================================================================
   Game Page Social Features: Reactions, Share Bar & Comments Section
   ========================================================================== */

/* 1. Hero Social Actions Bar (Reactions + Sharing) */
.game-social-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  background: none;
  backdrop-filter: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 1.25rem;
}

.social-reactions-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-reaction {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.9rem;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.btn-reaction:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-reaction.active-like {
  background: rgba(1, 135, 95, 0.18);
  border-color: var(--play-green);
  color: var(--play-green-light);
  box-shadow: 0 0 12px rgba(1, 135, 95, 0.25);
}

.btn-reaction.active-dislike {
  background: rgba(234, 67, 53, 0.18);
  border-color: var(--google-red);
  color: #fca5a5;
  box-shadow: 0 0 12px rgba(234, 67, 53, 0.25);
}

.reaction-count {
  font-weight: 700;
  font-size: 0.82rem;
  padding-left: 0.15rem;
}

.social-share-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
}

.share-label {
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 500;
  margin-right: 0.25rem;
}

.btn-share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: #000000;
  border: 1px solid #000000;
  color: var(--play-green);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.btn-share-icon:hover {
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-share-icon.btn-share-x:hover {
  background: #000000;
  border-color: #555555;
  color: #ffffff;
}

.btn-share-icon.btn-share-reddit:hover {
  background: #ff4500;
  border-color: #ff4500;
  color: #ffffff;
}

.btn-share-icon.btn-share-whatsapp:hover {
  background: #25d366;
  border-color: #25d366;
  color: #ffffff;
}

.btn-share-icon.btn-share-telegram:hover {
  background: #24A1DE;
  border-color: #24A1DE;
  color: #ffffff;
}

.btn-share-icon.btn-share-facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
  color: #ffffff;
}

.btn-share-icon.btn-share-copy:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Tooltip / Toast for Copy Link */
.copy-toast {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: #01875f;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  z-index: 10;
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* 2. Comments Section */
.comments-section-container {
  margin-top: 1rem;
}

.comments-auth-banner {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.comments-auth-banner-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.comments-auth-banner-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.4;
  margin-bottom: 1rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.comments-auth-btn-slot {
  display: flex;
  justify-content: center;
  align-items: center;
}

.comment-input-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.comment-author-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
}

.comment-author-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comment-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.comment-author-initial {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-author-name {
  font-weight: 600;
  color: #ffffff;
}

.btn-auth-signout {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
}

.btn-auth-signout:hover {
  color: #ef4444;
}

.comment-textarea {
  width: 100%;
  min-height: 90px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.45;
  padding: 0.75rem;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-textarea:focus {
  outline: none;
  border-color: var(--play-green);
  box-shadow: 0 0 0 2px rgba(1, 135, 95, 0.25);
}

.comment-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.65rem;
}

.comment-char-counter {
  font-size: 0.75rem;
  color: var(--text-primary);
}

.comments-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-card {
  background: rgba(30, 31, 32, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  transition: border-color 0.2s ease;
}

.comment-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.comment-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.comment-card-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.comment-card-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: #f1f5f9;
}

.comment-card-time {
  font-size: 0.75rem;
  color: var(--text-primary);
}

.comment-card-body {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.btn-comment-delete {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-comment-delete:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.no-comments-placeholder {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-primary);
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   COMPRESSED SUBMETRICS & ACCORDION NOTES
   ========================================================================== */

/* Master Category Header - Click to Collapse */
.difficulty-master-header {
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, transform 0.15s ease;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
  margin: -0.35rem -0.5rem 0.5rem -0.5rem;
}

.difficulty-master-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.category-collapse-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-left: 0.5rem;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
}

.difficulty-master-header:hover .category-collapse-arrow {
  color: #38bdf8;
}

/* When the master card is collapsed */
.difficulty-master-card.is-collapsed {
  padding-bottom: 0.85rem !important;
}

.difficulty-master-card.is-collapsed .category-collapse-arrow {
  transform: rotate(-90deg);
}

.difficulty-master-card.is-collapsed .metric-bump-slot,
.difficulty-master-card.is-collapsed .category-submetrics-toolbar,
.difficulty-master-card.is-collapsed .nested-submetrics-grid {
  display: none !important;
}

.category-submetrics-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
}

.category-submetrics-toolbar .difficulty-calc-desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.btn-submetric-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-submetric-toggle:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
}

.btn-submetric-toggle.is-active {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #fff;
}

.btn-toggle-all-subcomments {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toggle-all-subcomments:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.btn-toggle-all-subcomments.is-active {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #fff;
}

/* Slimmer & tighter submetric cards */
.nested-submetrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 0.55rem !important;
}

.nested-submetric-card {
  background: #2a2d33 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 0.6rem 0.8rem !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease, padding 0.2s ease !important;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.nested-submetric-card:hover {
  border-color: rgba(56, 189, 248, 0.35) !important;
  background: rgba(15, 23, 42, 0.85) !important;
}

.submetric-collapse-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: #64748b;
  margin-left: 0.35rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.nested-submetric-card:hover .submetric-collapse-arrow {
  color: #38bdf8;
}

/* When subcategory is collapsed: hide bump slot, comment bubble, and curve row */
.nested-submetric-card.is-sub-collapsed {
  padding: 0.45rem 0.75rem !important;
  background: rgba(15, 23, 42, 0.45) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

.nested-submetric-card.is-sub-collapsed .submetric-collapse-arrow {
  transform: rotate(-90deg);
}

.nested-submetric-card.is-sub-collapsed .metric-bump-slot,
.nested-submetric-card.is-sub-collapsed .metric-comment-bubble,
.nested-submetric-card.is-sub-collapsed .metric-curve-row {
  display: none !important;
}

/* Quality grade cards (Monetization & Ad Friction) collapse support */
.quality-grade-card {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.quality-grade-card:hover {
  border-color: rgba(56, 189, 248, 0.35) !important;
}

.quality-grade-card.is-sub-collapsed .metric-bump-slot,
.quality-grade-card.is-sub-collapsed .metric-comment-bubble {
  display: none !important;
}

.quality-grade-card.is-sub-collapsed .submetric-collapse-arrow {
  transform: rotate(-90deg);
}

.nested-submetric-top {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 0.4rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.nested-submetric-top .submetric-name {
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nested-submetric-top .metric-badge {
  font-size: 0.74rem !important;
  padding: 0.12rem 0.45rem !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
  flex-shrink: 0 !important;
}

/* Comment bubble hidden by default */
.metric-comment-bubble {
  display: none;
  margin-top: 0.35rem;
  padding: 0.45rem 0.65rem;
  background: rgba(30, 41, 59, 0.85);
  border-left: 2px solid #38bdf8;
  border-radius: 4px;
  font-size: 0.77rem;
  color: #cbd5e1;
  line-height: 1.4;
  font-style: italic;
  word-break: break-word;
}

.metric-comment-bubble.is-expanded {
  display: block !important;
  animation: fadeIn 0.2s ease-in-out;
}

/* ==========================================================================
   RELATED GAMES SECTION (METRIC-BASED SIMILARITY)
   ========================================================================== */

.related-games-section {
  margin-top: 2rem;
}

.related-games-desc {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-top: -0.3rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.related-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.related-game-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.related-game-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-color);
  box-shadow: var(--shadow-hover);
}

.related-game-banner {
  position: relative;
  width: 100%;
  height: 125px;
  background-color: #0f172a;
  overflow: hidden;
}

.related-game-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-game-card:hover .related-game-banner img {
  transform: scale(1.04);
}

.related-game-match-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(10, 15, 29, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.related-game-match-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.related-game-score-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid;
}

.related-game-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.4rem;
}

.related-game-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.related-game-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.related-game-meta {
  overflow: hidden;
}

.related-game-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.15rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-game-dev {
  font-size: 0.75rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-game-metric-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border-color);
}

.related-metric-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.03);
  padding: 0.25rem 0.15rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.related-metric-chip-label {
  font-size: 0.62rem;
  color: var(--text-primary);
  text-transform: uppercase;
}

.related-metric-chip-val {
  font-size: 0.74rem;
  font-weight: 700;
}

.related-game-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-color);
  font-size: 0.75rem;
}

.related-game-price {
  color: var(--text-dim);
  font-weight: 600;
}

.related-game-view-btn {
  color: var(--google-blue);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.related-match-reason {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
  color: #ffffff;
  line-height: 1.35;
}

.related-match-reason-dot {
  font-size: 0.75rem;
  flex-shrink: 0;
  display: inline-block;
}

.related-match-reason-text {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
}

.related-games-footer-action {
  display: flex;
  justify-content: center;
  margin-top: 1.75rem;
}

.btn-see-all-related {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(56, 189, 248, 0.25) 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  padding: 0.7rem 1.6rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.15);
}

.btn-see-all-related:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28) 0%, rgba(56, 189, 248, 0.45) 100%);
  border-color: rgba(56, 189, 248, 0.8);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(14, 165, 233, 0.35);
}

.btn-see-all-related .btn-arrow {
  transition: transform 0.2s ease;
  display: inline-block;
}

.btn-see-all-related:hover .btn-arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   Dedicated Related Games Full Page (related.html)
   ========================================================================== */
.related-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.related-page-breadcrumbs {
  margin-bottom: 1.5rem;
}

.related-breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.related-breadcrumb-link:hover {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.related-target-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.8) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: nowrap;
}

.related-target-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.related-target-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.related-target-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.related-target-subheading {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #38bdf8;
  font-weight: 700;
}

.related-target-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.related-target-details {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.related-target-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.related-count-badge {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.related-catalog-sort-notice {
  font-size: 0.78rem;
  color: #94a3b8;
}

.related-rank-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.related-rank-tag.rank-1 {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(217, 119, 6, 0.4) 100%);
  border-color: #f59e0b;
  color: #fbbf24;
}

.related-rank-tag.rank-2 {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.3) 0%, rgba(100, 116, 139, 0.4) 100%);
  border-color: #cbd5e1;
  color: #f1f5f9;
}

.related-rank-tag.rank-3 {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.3) 0%, rgba(146, 64, 14, 0.4) 100%);
  border-color: #d97706;
  color: #fed7aa;
}

/* ==========================================================================
   User Favorites, Love Heart Buttons & Player Profile
   ========================================================================== */

/* Game Card Heart Button (Bottom-Right of Card) */
.game-card-heart-btn {
  position: absolute;
  bottom: 0.65rem;
  right: 0.65rem;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(18, 20, 24, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  color: #ffffff;
}

.game-card-heart-btn:hover {
  transform: scale(1.12);
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(30, 32, 38, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.game-card-heart-btn .heart-svg {
  width: 17px;
  height: 17px;
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 2;
  fill: transparent;
  transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-card-heart-btn:hover .heart-svg {
  stroke: #f87171;
}

/* Active Loved State */
.game-card-heart-btn.loved {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.45);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.25);
}

.game-card-heart-btn.loved .heart-svg {
  stroke: #f87171;
  fill: #f87171;
}

/* Heart Pulse Animation on Toggle */
@keyframes tgscHeartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.heart-pulse {
  animation: tgscHeartPulse 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Game Page Hero Header Love Button */
.game-page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
  margin-bottom: 0.25rem;
}

.btn-love-heart {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background: rgba(30, 32, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.btn-love-heart:hover {
  background: rgba(45, 48, 56, 0.95);
  border-color: rgba(248, 113, 113, 0.5);
  color: #f87171;
}

.btn-love-heart .heart-svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2;
  fill: transparent;
  transition: all 0.2s ease;
}

.btn-love-heart.loved {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.45);
  color: #f87171;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.2);
}

.btn-love-heart.loved .heart-svg {
  stroke: #f87171;
  fill: #f87171;
}

/* Nav Header Profile Button */
.btn-profile-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  background: rgba(30, 32, 38, 0.85);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.btn-profile-nav:hover {
  background: rgba(45, 48, 56, 0.95);
  border-color: #38bdf8;
  color: #38bdf8;
}

.profile-nav-badge {
  background: #f87171;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 9999px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(248, 113, 113, 0.4);
}

/* User Profile Modal Dialog */
dialog#userProfileModal {
  max-width: 820px;
  width: 92vw;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-primary);
  padding: 0;
  margin: auto;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  outline: none;
}

dialog#userProfileModal::backdrop {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.profile-modal-content {
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.profile-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.5rem 1.75rem 1.25rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.profile-modal-title-group h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.01em;
}

.profile-modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.profile-modal-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Logged Out View Card */
.profile-login-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  gap: 1rem;
}

.profile-perks-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
  max-width: 480px;
  width: 100%;
  margin: 0.5rem 0 1rem;
}

.profile-perk-item {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.4;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-perk-icon {
  font-size: 1.05rem;
  flex-shrink: 0;
}

.profile-google-btn-wrapper {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  min-height: 44px;
}

/* User Profile Banner Bar */
.profile-user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  gap: 1rem;
  flex-wrap: nowrap;
}

.profile-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.profile-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  object-fit: cover;
}

.profile-user-name {
  font-weight: 700;
  font-size: 0.98rem;
  color: #ffffff;
}

.profile-user-email {
  font-size: 0.78rem;
  color: var(--text-primary);
}

.profile-user-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.profile-stat-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #f87171;
  border-radius: 9999px;
}

/* Profile Sections */
.profile-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-section-header {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.profile-section-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.profile-section-hint {
  font-size: 0.78rem;
  color: var(--text-primary);
}

/* Loved Games List */
.profile-fav-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.profile-fav-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.profile-fav-row:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.15);
}

.profile-fav-row.fav-row-excluded {
  opacity: 0.6;
  border-style: dashed;
}

.profile-fav-thumb-link {
  flex-shrink: 0;
  display: block;
}

.profile-fav-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-fav-meta {
  flex: 1;
  min-width: 0;
}

.profile-fav-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #ffffff;
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-fav-title:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.profile-fav-sub {
  font-size: 0.75rem;
  color: var(--text-primary);
  margin-top: 0.15rem;
}

/* Custom Styled Toggle Switch */
.profile-fav-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.tgsc-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  cursor: pointer;
  flex-shrink: 0;
}

.tgsc-switch-input {
  opacity: 0;
  width: 0;
  height: 0;
}

.tgsc-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tgsc-switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.tgsc-switch-input:checked + .tgsc-switch-slider {
  background-color: #34d399;
  border-color: #10b981;
}

.tgsc-switch-input:checked + .tgsc-switch-slider:before {
  transform: translateX(16px);
}

.profile-fav-toggle-label {
  font-size: 0.74rem;
  font-weight: 600;
  min-width: 60px;
}

.btn-fav-remove {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-fav-remove:hover {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

.profile-empty-card {
  text-align: center;
  padding: 2rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

/* Tendency Chips */
.profile-tendency-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
}

.tendency-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.78rem;
}

.tendency-chip-name {
  color: var(--text-dim);
  font-weight: 500;
}

.tendency-chip-val {
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-size: 0.74rem;
  letter-spacing: -0.01em;
}

/* Recommendations Grid */
.profile-rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.profile-rec-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-rec-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.profile-rec-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
  display: block;
}

.profile-rec-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.profile-rec-card:hover .profile-rec-img {
  transform: scale(1.05);
}

.profile-rec-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: rgba(15, 17, 21, 0.88);
  backdrop-filter: blur(4px);
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  z-index: 2;
}

.profile-rec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.profile-rec-body {
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.profile-rec-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.profile-rec-title:hover {
  color: #38bdf8;
}

.profile-rec-meta {
  font-size: 0.74rem;
  color: var(--text-primary);
}

.profile-rec-metrics {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.mini-pill {
  font-size: 0.68rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}

.btn-rec-scorecard {
  margin-top: auto;
  padding: 0.4rem 0.6rem;
  text-align: center;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-rec-scorecard:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
}

/* Global Toast Feedback */
.tgsc-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(18, 20, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tgsc-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Metric & Submetric Info Tooltips
   ========================================================================== */
.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  min-width: 15px;
  min-height: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #94a3b8;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-style: italic;
  line-height: 1;
  cursor: help;
  position: relative;
  vertical-align: middle;
  margin-left: 0.35rem;
  user-select: none;
  transition: all 0.18s ease;
  outline: none;
  flex-shrink: 0;
}

.info-btn:hover,
.info-btn:focus-visible,
.info-btn.is-active {
  color: #38bdf8;
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.4);
}

/* Tooltip Floating Popup Box */
.info-tooltip-box {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #0b0f19;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 1px rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  width: max-content;
  max-width: 250px;
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.42;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 100000;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: normal;
  box-sizing: border-box;
  text-shadow: none;
  letter-spacing: normal;
}

.info-tooltip-box strong {
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.78rem;
  display: inline-block;
  margin-bottom: 0.2rem;
}

/* Downward pointer arrow */
.info-tooltip-box::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #0b0f19 transparent transparent transparent;
}

/* Arrow outline effect */
.info-tooltip-box::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(56, 189, 248, 0.35) transparent transparent transparent;
}

/* Show on hover, focus, or active click */
.info-btn:hover .info-tooltip-box,
.info-btn:focus-visible .info-tooltip-box,
.info-btn.is-active .info-tooltip-box {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Prevent tooltip cut-off on mobile devices */
@media (max-width: 640px) {
  .info-tooltip-box {
    max-width: 210px;
    left: 0;
    transform: translateX(-20px) translateY(4px);
  }
  .info-tooltip-box::after,
  .info-tooltip-box::before {
    left: 27px;
  }
  .info-btn:hover .info-tooltip-box,
  .info-btn:focus-visible .info-tooltip-box,
  .info-btn.is-active .info-tooltip-box {
    transform: translateX(-20px) translateY(0);
  }
}

/* -----------------------------------------------------------------------------
 * Brain Chemistry System (Admin)
 * ----------------------------------------------------------------------------- */
.admin-brain-card {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(30, 41, 59, 0.4);
  border: 1px dashed var(--play-green);
  border-radius: var(--radius-sm);
}

.admin-brain-header {
  font-size: 0.75rem;
  color: var(--play-green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.admin-brain-mood {
  font-size: 0.85rem;
  color: var(--text-base);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.admin-brain-bars {
  display: flex;
  gap: 2px;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-surface-elevated);
}

.chem-bar-wrap {
  flex: 1; /* evenly distribute missing or we can use fixed width based on pct inline */
  height: 100%;
}
.chem-bar {
  height: 100%;
}

.bg-adr { background-color: #ef4444; } /* Red - Adrenaline */
.bg-cor { background-color: #f59e0b; } /* Orange - Cortisol */
.bg-ser { background-color: #10b981; } /* Green - Serotonin */
.bg-oxy { background-color: #ec4899; } /* Pink - Oxytocin */
.bg-dop { background-color: #3b82f6; } /* Blue - Dopamine */

/* Detailed view on game page */
.admin-brain-detailed {
  background: rgba(30, 41, 59, 0.3);
  border: 1px dashed var(--play-green);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.admin-brain-detailed h2 {
  font-size: 1.1rem;
  color: var(--play-green);
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 0.5rem;
}
.brain-top-level {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.brain-label {
  color: var(--text-primary);
  font-size: 0.85rem;
  display: block;
}
.brain-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-base);
}
.brain-val.adrenaline { color: #ef4444; }
.brain-val.cortisol { color: #f59e0b; }
.brain-val.serotonin { color: #10b981; }
.brain-val.oxytocin { color: #ec4899; }
.brain-val.dopamine { color: #3b82f6; }

.brain-profile-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.brain-profile-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brain-profile-label {
  width: 80px;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.brain-profile-track {
  flex: 1;
  height: 8px;
  background: var(--bg-surface-elevated);
  border-radius: 4px;
  overflow: hidden;
}
.brain-profile-fill {
  height: 100%;
  border-radius: 4px;
}
.brain-profile-pct {
  width: 40px;
  text-align: right;
  font-size: 0.85rem;
  font-family: monospace;
  color: var(--text-base);
}

.brain-breakdown-list h3 {
  font-size: 0.95rem;
  color: var(--text-base);
  margin-bottom: 1rem;
}
.brain-breakdown-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.brain-breakdown-list li {
  background: rgba(0,0,0,0.2);
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-dim);
}
.brain-breakdown-list strong {
  color: var(--text-base);
}
.brain-tags {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
}
.brain-tag {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}
.brain-tag.adrenaline { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.brain-tag.cortisol { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.brain-tag.serotonin { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.brain-tag.oxytocin { background: rgba(236, 72, 153, 0.2); color: #ec4899; }
.brain-tag.dopamine { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-base);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto; /* Push to the right */
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
  .header-nav {
    display: none;
    position: absolute;
    top: 60px; /* Below header */
    left: 0;
    right: 0;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    flex-direction: column;
    padding: 1rem;
    gap: 0.75rem;
    z-index: 1000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  }
  
  .header-nav.active {
    display: flex;
  }
  
  .header-nav button, .header-nav a {
    width: 100%;
    justify-content: center;
  }
  
  /* Reset previous mobile hiding of text inside buttons */
  .btn-youtube span, .btn-admin span:not(:first-child), .btn-metrics span:not(:first-child), .btn-subscribe span:not(:first-child), .btn-profile-nav span:not(:first-child) {
    display: inline-block;
  }
  
  /* Ensure header container is relative for absolute positioning of nav */
  .top-nav {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

/* Public Game Mood UI */
.public-game-mood {
  background: linear-gradient(135deg, rgba(30,58,138,0.5), rgba(88,28,135,0.5));
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
  margin-top: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.2);
}

.public-game-mood-specific {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(30,58,138,0.6), rgba(88,28,135,0.6));
  color: #ffffff;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(88,28,135,0.4);
}



















.full-width-panel { width: 100%; border-radius: 0; border-left: none; border-right: none; margin: 0; }


/* Metrics Info Icon */
.metrics-info-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  color: #555;
  font-size: 11px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.metrics-info-icon:hover {
  background: rgba(0, 0, 0, 0.2);
  color: #333;
}

.metrics-info-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 120%;
  right: -5px;
  width: 250px;
  background-color: #334155;
  color: #ffffff;
  text-align: left;
  border-radius: 6px;
  padding: 10px;
  font-size: 0.8rem;
  line-height: 1.4;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
}

.metrics-info-icon:hover .metrics-info-tooltip,
.metrics-info-icon:focus .metrics-info-tooltip {
  visibility: visible;
  opacity: 1;
}

.metrics-info-tooltip strong {
  color: #c084fc;
}

@media (max-width: 768px) {
  .metrics-info-icon {
    top: 4px;
    right: 4px;
  }
}

/* Gameplay Video Details / Proof Timestamps Section */
.gameplay-proof-details-container {
  margin-bottom: 1.25rem;
  background: transparent;
  border: none;
  padding: 0;
}

.proof-categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

@media (max-width: 992px) {
  .proof-categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }
}

@media (max-width: 520px) {
  .proof-categories-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* 4 White Category Cards with Dark Text & Soft Shadow */
.proof-category-column {
  background: #ffffff;
  color: #0f172a;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.proof-category-column:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22), 0 3px 8px rgba(0, 0, 0, 0.1);
}

.proof-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 0.45rem;
  margin-bottom: 0.55rem;
}

.proof-category-header .game-card-text-label {
  font-weight: 800;
  font-size: 0.95rem;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.proof-category-header .game-card-text-score {
  font-weight: 800;
  font-size: 0.95rem;
}

.proof-subcategories-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.proof-sub-item-block {
  display: flex;
  flex-direction: column;
}

.proof-sub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.78rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
  cursor: pointer;
}

.proof-sub-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.proof-sub-main {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

.proof-sub-name {
  color: #1e293b;
  font-weight: 600;
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proof-sub-score {
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
  padding: 0.05rem 0.25rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
}

.proof-sub-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.proof-timestamp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: inherit;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.proof-timestamp-btn:hover {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
  transform: translateY(-1px);
}

.proof-timestamp-btn.active {
  background: #047857;
  color: #ffffff;
  border-color: #047857;
}

.proof-comment-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.proof-comment-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.proof-comment-btn.active-comment {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
}

.proof-sub-comment-bubble {
  margin-top: 0.3rem;
  padding: 0.45rem 0.65rem;
  background: #f8fafc;
  border-left: 3px solid #3b82f6;
  border-radius: 0 6px 6px 0;
  font-size: 0.74rem;
  line-height: 1.45;
  color: #334155;
  font-style: italic;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  animation: proofFadeIn 0.18s ease-in-out;
}

@keyframes proofFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* AI Verification & Verdict Section Underneath Video */
.gameplay-ai-verdict-container {
  margin-top: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 12px);
  padding: 1.25rem 1.4rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.ai-verdict-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-verdict-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-verdict-icon {
  font-size: 1.25rem;
}

.ai-verdict-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.ai-verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.ai-verdict-text {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #e2e8f0;
  margin-bottom: 1rem;
}

.ai-verdict-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 0.85rem;
}

@media (max-width: 768px) {
  .ai-verdict-highlights {
    grid-template-columns: 1fr;
  }
}

.ai-verdict-highlight-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--play-green, #10b981);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.ai-verdict-highlight-item strong {
  color: #ffffff;
}

.ai-verdict-footer {
  margin-top: 1rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  color: var(--text-dim, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.proof-timestamp-na {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
  line-height: 1.2;
}

/* ==========================================================================
   AI Natural Language Game Matcher Panel & Card Match Badges
   ========================================================================== */

.ai-search-panel {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

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

.ai-search-title-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ai-search-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ai-search-subtitle {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.ai-search-input-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.ai-search-input-wrap {
  flex: 1;
  position: relative;
}

.ai-search-input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.65rem 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

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

.ai-search-input:focus {
  border-color: #9e9e9e;
  background-color: #ffffff;
}

.ai-search-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.btn-ai-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--play-green);
  color: #ffffff;
  border: 1px solid var(--play-green);
  border-radius: var(--radius-pill);
  padding: 0.62rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn-ai-search:hover:not(:disabled) {
  background-color: var(--play-green-hover);
  border-color: var(--play-green-hover);
  color: #ffffff;
}

.btn-ai-search:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-ai-clear {
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.62rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-ai-clear:hover {
  background-color: var(--bg-card-hover);
  border-color: #bdbdbd;
}

.ai-prompt-chips {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.ai-prompt-chips::-webkit-scrollbar {
  display: none;
}

.ai-prompt-label {
  font-size: 0.76rem;
  color: var(--text-dim);
  font-weight: 600;
  margin-right: 0.1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.ai-prompt-chip {
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  font-family: var(--font-sans);
  white-space: nowrap;
  flex-shrink: 0;
}

.ai-prompt-chip:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.ai-search-result-banner {
  margin-top: 0.2rem;
  padding: 0.65rem 0.85rem;
  background-color: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.ai-result-banner-left {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.ai-result-banner-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.ai-result-banner-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.btn-ai-banner-reset {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.38rem 0.8rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-ai-banner-reset:hover {
  background-color: var(--bg-card-hover);
  border-color: #bdbdbd;
}

/* Game Card AI Description & Match Score */
.ai-card-match-score {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--play-green);
  background-color: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  padding: 0.08rem 0.45rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.game-card-metrics-row.game-card-ai-desc-row {
  display: block !important;
  grid-template-columns: none !important;
  padding: 0.55rem 1rem !important;
}

.ai-card-match-reason {
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .ai-search-input-row {
    flex-direction: column;
    align-items: stretch;
  }
  .ai-search-actions {
    width: 100%;
  }
  .btn-ai-search {
    flex: 1;
    justify-content: center;
  }
  .ai-prompt-chips {
    flex-wrap: nowrap;
    gap: 0.25rem;
  }
  .ai-prompt-label {
    font-size: 0.68rem;
    margin-right: 0.05rem;
  }
  .ai-prompt-chip {
    font-size: clamp(0.58rem, 2.35vw, 0.7rem);
    padding: 0.2rem 0.42rem;
  }
  .ai-search-result-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .game-card-metrics-row.game-card-ai-desc-row {
    display: block !important;
    grid-template-columns: none !important;
    padding: 0.4rem 0.75rem !important;
  }
  .ai-card-match-reason {
    font-size: 0.74rem;
    line-height: 1.35;
  }
}

/* =========================================
   Review Date Row & Update Details Modal
   ========================================= */
.game-review-date-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.review-date-label {
  font-weight: 600;
  color: var(--text-dim);
}

.review-date-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.18rem 0.55rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.25);
  text-underline-offset: 2px;
}

.review-date-btn:hover {
  background-color: var(--bg-card-hover);
  border-color: #bdbdbd;
  text-decoration-color: var(--text-primary);
}

.review-update-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #d97706;
  flex-shrink: 0;
}

.review-date-info-btn {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
  font-size: 0.75rem;
  width: 19px;
  height: 19px;
  padding: 0;
  margin-left: 0.05rem;
}

.review-date-info-btn:hover,
.review-date-info-btn.is-active {
  background-color: var(--bg-card-hover);
  border-color: #9e9e9e;
  color: var(--text-primary);
}

.review-date-info-btn .info-tooltip-box {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-style: normal;
  font-weight: 400;
}

.review-update-modal .modal-box {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.review-update-summary-card {
  background-color: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.review-update-summary-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
}

.review-update-summary-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.review-update-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}

.review-update-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.review-update-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.8rem 0.95rem;
}

.review-update-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.review-update-item-date {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}

.review-update-version {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-dim);
  background-color: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.1rem 0.5rem;
}

.review-update-notes {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-primary);
  word-break: break-word;
}

.review-update-notes-empty {
  color: var(--text-dim);
  font-style: italic;
}

.review-update-empty-box {
  background-color: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.review-update-last-play {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* =========================================
   Main Search Collapsible Bar
   ========================================= */
.btn-main-search-toggle {
  width: 100%;
  box-sizing: border-box;
}

.main-search-collapsible-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

@media (max-width: 768px) {
  .main-search-collapsible-body {
    gap: 0.5rem;
  }
}

/* =========================================
   What Is This? Link & Modal
   ========================================= */
.what-is-this-row {
  margin-bottom: 0.65rem;
}

.btn-what-is-this {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.btn-what-is-this:hover {
  color: var(--text-primary);
}

/* =========================================
   Quick Hooks Bar (4 Categories -> 2 Presets)
   ========================================= */
.quick-hooks-container {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.quick-hooks-main-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.btn-quick-hook {
  flex: 1;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.38rem 0.6rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-quick-hook:hover {
  background-color: var(--bg-card-hover);
  border-color: #bdbdbd;
}

.btn-quick-hook.is-open {
  background-color: var(--bg-card-hover);
  border-color: #9e9e9e;
}

.btn-quick-hook.has-active-preset {
  border-color: var(--play-green);
  color: var(--play-green);
}

.quick-hooks-sub-row {
  display: flex;
  align-items: center;
  width: 100%;
}

.quick-hooks-sub-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}

.btn-quick-hook-preset {
  flex: 1;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.36rem 0.65rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-quick-hook-preset:hover {
  background-color: var(--bg-card-hover);
  border-color: #bdbdbd;
}

.btn-quick-hook-preset.active {
  background-color: var(--play-green);
  border-color: var(--play-green);
  color: #ffffff;
}

@media (max-width: 600px) {
  .quick-hooks-main-row {
    gap: 0.28rem;
  }
  .btn-quick-hook {
    padding: 0.34rem 0.35rem;
    font-size: clamp(0.68rem, 2.7vw, 0.78rem);
  }
  .quick-hooks-sub-group {
    gap: 0.28rem;
  }
  .btn-quick-hook-preset {
    padding: 0.34rem 0.45rem;
    font-size: clamp(0.7rem, 2.8vw, 0.78rem);
  }
}





