/* ============================================
   Can My GPU Run? — Design System & Components
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0c10;
  --bg-secondary: #12151c;
  --bg-card: #181c26;
  --bg-card-hover: #1e2330;
  --bg-input: #141820;
  --border: #252a3a;
  --border-accent: #2d3548;

  --accent: #00d4aa;
  --accent-secondary: #00b4d8;
  --accent-gradient: var(--accent);
  --accent-glow: rgba(255, 255, 255, 0.06);
  --text-on-accent: #0a0c10;

  --rating-s: #00e676;
  --rating-a: #66bb6a;
  --rating-b: #fdd835;
  --rating-c: #ffa726;
  --rating-d: #ef5350;
  --rating-f: #78909c;

  --text-primary: #e4e8f0;
  --text-secondary: #8892a4;
  --text-muted: #7a8194;

  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  --transition: 0.2s ease;
  --nav-height: 56px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

[hidden] { display: none !important; }

/* --- Site Nav --- */
.site-nav {
  height: var(--nav-height);
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: opacity var(--transition);
}

.nav-brand:hover { opacity: 0.85; }

.nav-brand-accent {
  color: var(--accent);
}

.nav-hiw-btn {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all var(--transition);
}

.nav-hiw-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.nav-hiw-active {
  color: var(--accent);
  border-color: var(--accent);
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: var(--space-xl) 0 var(--space-2xl);
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0,212,170,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-md);
}

.hero-accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* --- GPU Selector --- */
.gpu-selector-wrapper {
  max-width: 460px;
  margin: 0 auto;
}

.gpu-selector-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
}

.gpu-selector-container {
  position: relative;
}

.gpu-select {
  width: 100%;
  padding: 14px 48px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-accent);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-align-last: center;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.gpu-dropdown {
  position: relative;
}

.gpu-dropdown-trigger {
  position: relative;
  width: 100%;
  padding: 14px 48px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-accent);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.gpu-dropdown-trigger:hover { border-color: var(--accent); }
.gpu-dropdown-trigger:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.gpu-dropdown-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.gpu-dropdown-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  transition: transform var(--transition);
}

.gpu-dropdown-trigger[aria-expanded="true"] .gpu-dropdown-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.gpu-dropdown-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gpu-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 360px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1.5px solid var(--border-accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 1000;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-card);
}

.gpu-dropdown-menu:not([hidden]) {
  animation: dropdownOpen 0.15s ease-out;
}

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

.gpu-dropdown-group-label {
  padding: 10px 16px 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
}

.gpu-dropdown-option {
  padding: 10px 16px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: background 0.1s;
}

.gpu-dropdown-option:hover,
.gpu-dropdown-option.focused {
  background: rgba(255, 255, 255, 0.06);
}

.gpu-dropdown-option.selected {
  color: var(--accent);
  font-weight: 600;
}

/* --- GPU Stats Card --- */
/* GPU Stats Inline (inside recommendations header) */
.rec-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.rec-header-text {
  flex: 1;
  min-width: 240px;
}

.gpu-stats-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 8px 18px;
}

.gpu-stats-inline .gpu-stats-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.gpu-stats-sep {
  width: 1px;
  height: 14px;
  background: var(--border);
  flex-shrink: 0;
}

.gpu-stat-inline {
  white-space: nowrap;
  font-weight: 500;
}

.gpu-stats-inline .gpu-stat-value {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.85rem;
}

/* GPU Feature Pills */
.gpu-stats-features {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 2px;
}

.gpu-stats-features::before {
  content: '';
  width: 1px;
  height: 14px;
  background: var(--border);
  flex-shrink: 0;
}

.gpu-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.gpu-feature-pill.fp8 {
  color: var(--accent);
}

.gpu-feature-pill svg {
  opacity: 0.7;
  width: 10px;
  height: 10px;
}

/* Rating Legend Strip */
.rating-legend-section {
  padding: var(--space-lg) 0;
  position: relative;
}

.rating-legend-section::after {
  content: '';
  display: block;
  max-width: 1200px;
  margin: var(--space-lg) auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.rating-legend-strip {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.legend-strip-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.legend-strip-title::before {
  display: none;
}

.legend-strip-items {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  align-items: center;
}

.legend-strip-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.legend-strip-item .rating-badge {
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
  border-radius: 5px;
  flex-shrink: 0;
}

/* --- Filters Bar --- */
.filters-section {
  padding: var(--space-lg) 0 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}

.filters-bar {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding-bottom: var(--space-md);
  flex-wrap: wrap;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  gap: var(--space-xs);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 0;
}
.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

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

.category-tab.active {
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 700;
}

.category-tab .tab-count {
  font-size: 0.75rem;
  margin-left: 4px;
  opacity: 0.7;
}

/* Search & Sort */
.filters-controls {
  display: flex;
  gap: var(--space-sm);
  flex: 1;
  justify-content: flex-end;
  min-width: 280px;
}

.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 280px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 8px 36px 8px 38px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  transition: border-color var(--transition);
}

.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sort-select {
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  min-width: 160px;
}

.sort-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Results Summary */
.results-summary {
  padding: var(--space-sm) 0 var(--space-md);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.results-summary strong {
  color: var(--text-primary);
  font-weight: 600;
}

.results-rating-dist {
  display: inline-flex;
  gap: 5px;
  margin-left: 8px;
}

.mini-rating {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.mini-S { background: rgba(0, 230, 118, 0.18); color: var(--rating-s); }
.mini-A { background: rgba(102, 187, 106, 0.18); color: var(--rating-a); }
.mini-B { background: rgba(253, 216, 53, 0.18); color: var(--rating-b); }
.mini-C { background: rgba(255, 167, 38, 0.18); color: var(--rating-c); }
.mini-D { background: rgba(239, 83, 80, 0.18); color: var(--rating-d); }
.mini-F { background: rgba(120, 144, 156, 0.18); color: var(--rating-f); }

/* --- Model Grid --- */
.results-section {
  padding: 0 0 var(--space-3xl);
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

/* --- Model Card --- */
.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.model-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* Card header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
}

.card-title-group {
  flex: 1;
  min-width: 0;
}

.card-category-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  display: inline-block;
}

/* 4 consolidated badge color groups */
.badge-image { background: rgba(77,171,247,0.2); color: #6db8ff; }
.badge-video { background: rgba(255,169,77,0.2); color: #ffb86c; }
.badge-enhance { background: rgba(0,212,170,0.2); color: #2ee8be; }
.badge-creative { background: rgba(190,147,255,0.2); color: #c9a5ff; }

.card-name {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  word-break: break-word;
}

.card-variant {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Rating Badge */
.rating-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
}

.rating-S { background: rgba(0,230,118,0.15); color: var(--rating-s); }
.rating-A { background: rgba(102,187,106,0.15); color: var(--rating-a); }
.rating-B { background: rgba(253,216,53,0.15); color: var(--rating-b); }
.rating-C { background: rgba(255,167,38,0.15); color: var(--rating-c); }
.rating-D { background: rgba(239,83,80,0.15); color: var(--rating-d); }
.rating-F { background: rgba(120,144,156,0.15); color: var(--rating-f); }

/* VRAM Bar */
.vram-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8rem;
}

.vram-label {
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.vram-bar-container {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}

.vram-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
  min-width: 2px;
}

.vram-bar-fill.usage-low { background: var(--rating-a); }
.vram-bar-fill.usage-medium { background: var(--rating-b); }
.vram-bar-fill.usage-high { background: var(--rating-c); }
.vram-bar-fill.usage-critical { background: var(--rating-d); }

.vram-value {
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
  min-width: 80px;
  text-align: right;
}

/* Card info row */
.card-info-row {
  display: flex;
  gap: var(--space-md);
  font-size: 0.8rem;
}

.card-info-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
}

.card-info-item .info-label {
  color: var(--text-muted);
}

.speed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.speed-fast { background: var(--rating-a); }
.speed-moderate { background: var(--rating-b); }
.speed-slow { background: var(--rating-c); }
.speed-very_slow { background: var(--rating-d); }

/* Download Button */
.card-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: auto;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  transition: all var(--transition);
  flex-shrink: 0;
}

.card-download-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.card-download-btn.disabled {
  opacity: 0.2;
  pointer-events: none;
  cursor: default;
}

/* View Toggle Button */
.view-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.view-toggle:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

/* --- List View --- */
.model-grid.list-view {
  grid-template-columns: 1fr;
  gap: 0;
}

/* Shared grid columns for header + rows */
.list-header,
.model-list-item {
  display: grid;
  grid-template-columns: 44px 1fr 64px 28px 180px 64px 80px 36px;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--space-md);
}

/* Column header */
.list-header {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
}

/* List rows */
.model-list-item {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding-top: 8px;
  padding-bottom: 8px;
  transition: background var(--transition);
}

.model-list-item:hover {
  background: var(--bg-card-hover);
}

.model-list-item:first-of-type {
  border-top: none;
}

/* Column: Rating */
.list-col-rating {
  display: flex;
  justify-content: center;
}

.model-list-item .rating-badge {
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Column: Name */
.list-col-name {
  min-width: 0;
}

.list-col-name .card-name {
  font-size: 0.88rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-col-name .card-meta {
  font-size: 0.68rem;
}

/* Column: Type icon */
.list-col-type {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-muted);
}
.list-col-type svg {
  width: 16px;
  height: 16px;
}
.list-col-type.type-image { color: #4dabf7; }
.list-col-type.type-video { color: #ffa94d; }
.list-col-type.type-enhance { color: #00d4aa; }
.list-col-type.type-creative { color: #be93ff; }

/* Column: Download size */
.list-col-size {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
}

/* Column: VRAM */
.list-col-vram {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.list-col-vram .vram-bar-container {
  flex: 1;
  height: 6px;
}

.list-col-vram .vram-value {
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 54px;
  text-align: right;
}

/* Column: Format */
.list-col-format {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Column: Speed */
.list-col-speed {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Column: Link */
.list-col-link {
  display: flex;
  justify-content: center;
}

/* Card tips */
.card-tips {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-top: var(--space-xs);
  border-top: 1px solid var(--border);
}

.card-tips summary {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-tips summary::before {
  content: '\25B8';
  transition: transform var(--transition);
}

.card-tips[open] summary::before {
  transform: rotate(90deg);
}

.card-tips-content {
  margin-top: var(--space-sm);
}

.card-tips .tip-note {
  padding: 4px 0;
}

.card-tips .tip-warning {
  color: var(--rating-c);
}

/* --- Empty State --- */
/* --- Hero Landing (empty state) --- */
.hero-landing {
  margin-top: var(--space-2xl);
}

.hero-stats-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.hero-stat-number {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1.1;
}

.hero-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  opacity: 0.5;
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.hero-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  column-gap: var(--space-md);
  row-gap: 4px;
  align-items: center;
  transition: border-color var(--transition);
}

.hero-feature-card:hover {
  border-color: var(--border-accent);
}

.hero-feature-icon {
  color: var(--accent);
  opacity: 0.7;
  grid-row: 1 / -1;
}

.hero-feature-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.hero-feature-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.hero-seo-blurb {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto var(--space-lg);
  opacity: 0.7;
}

.hero-trust-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-trust-line svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* GPU Analysis Loading Animation */
.gpu-analysis-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-2xl) 0 var(--space-xl);
  animation: galFadeIn 0.4s ease;
}
@keyframes galFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.gal-gpu-badge {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 20px;
  margin-bottom: var(--space-xl);
}
.gal-gpu-icon {
  color: var(--accent);
  flex-shrink: 0;
}
.gal-gpu-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.gal-progress-ring {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: var(--space-lg);
}
.gal-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.gal-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 6;
}
.gal-ring-fill {
  fill: none;
  stroke: url(#gal-gradient) var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.05s linear;
}
.gal-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.gal-counter {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.gal-counter-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.gal-status {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 var(--space-md);
  min-height: 1.3em;
  transition: opacity 0.2s;
}
.gal-bar-track {
  width: 280px;
  max-width: 80%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.gal-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: 2px;
  transition: width 0.05s linear;
}

/* No results */
.no-results {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-muted);
}

.no-results-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

/* --- Footer --- */
.footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.footer-disclaimer {
  margin-top: var(--space-sm);
  opacity: 0.7;
}

.footer-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity var(--transition);
}

.footer-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* --- Loading Overlay --- */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto var(--space-md);
}

.loading-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Smart Recommendations --- */
.recommendations-section {
  padding: var(--space-xl) 0;
  background: transparent;
}

/* Toggle button — hidden on desktop, visible on mobile */
.rec-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: transform 0.2s;
}
.rec-toggle[aria-expanded="false"] { transform: rotate(-90deg); }
.rec-toggle[aria-expanded="true"] { transform: rotate(0deg); }

/* Collapsed state on mobile */
.recommendations-section.rec-collapsed .rec-scroll,
.recommendations-section.rec-collapsed .rec-subheading,
.recommendations-section.rec-collapsed .gpu-stats-inline {
  display: none;
}

.rec-heading {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rec-heading::before {
  display: none;
}

.rec-subheading {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0;
  padding-left: 13px;
}

.rec-scroll {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.rec-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.rec-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  border-color: var(--border-accent);
}

.rec-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 5px;
}

.rec-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.rec-category-tag {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rec-reason {
  font-size: 0.7rem;
  color: var(--accent);
  opacity: 0.8;
  font-weight: 500;
  line-height: 1.3;
}

.rec-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.rec-metric {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.rec-metric svg {
  width: 10px;
  height: 10px;
  opacity: 0.55;
  flex-shrink: 0;
}

.rec-card .rec-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
}

.rec-title-group {
  flex: 1;
  min-width: 0;
}

.rec-name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.rec-variant {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.rec-card .rec-header .rating-badge {
  width: 36px;
  height: 36px;
  font-size: 1rem;
  border-radius: 8px;
}

.rec-tagline {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.rec-cta {
  margin-top: auto;
  padding: 9px 18px;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.rec-cta:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

/* --- Card Polish --- */
.card-incompatible {
  opacity: 0.45;
  filter: grayscale(0.3);
}

.card-incompatible:hover {
  opacity: 0.7;
}

.card-perfect {
  border-color: rgba(255,215,0,0.15);
}

.card-perfect:hover {
  border-color: rgba(255,215,0,0.3);
}

/* Card highlight animation (from recommendation click) */
.model-card.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

/* --- Sticky Filter Shadow --- */
.filters-section.stuck {
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* --- Floating Buttons --- */
.floating-buttons {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.floating-help {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.floating-help:hover {
  background: var(--bg-card-hover);
  color: var(--accent);
  border-color: var(--accent);
}

.floating-help::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 54px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.floating-help:hover::after {
  opacity: 1;
}

.back-to-top {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.back-to-top:hover {
  background: var(--bg-card-hover);
  color: var(--accent);
  border-color: var(--accent);
}

/* --- How It Works Page --- */
.hiw-page {
  min-height: 100vh;
}

.hiw-hero {
  position: relative;
  padding: var(--space-3xl) 0 var(--space-2xl);
  text-align: center;
  overflow: hidden;
}

.hiw-hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.hiw-hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-md);
}

.hiw-hero-sub {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

.hiw-container {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.hiw-section {
  padding: var(--space-3xl) 0;
}

.hiw-section-alt {
  background: var(--bg-secondary);
}

.hiw-heading {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  position: relative;
}

.hiw-text {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md);
  font-size: 0.95rem;
}

.hiw-text:last-child {
  margin-bottom: 0;
}

/* Steps */
.hiw-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.hiw-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}

.hiw-step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: var(--text-on-accent);
  font-size: 1.3rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.hiw-step-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.hiw-step-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Ratings */
.hiw-ratings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.hiw-rating-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
}

.hiw-rating-card .rating-badge {
  flex-shrink: 0;
  margin-top: 2px;
}

.hiw-rating-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.hiw-rating-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Formats */
.hiw-formats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.hiw-format-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.hiw-format-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hiw-format-tag {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: rgba(0, 212, 170, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.hiw-format-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* FAQ */
.hiw-faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.hiw-faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition);
}

.hiw-faq-item[open] {
  border-color: rgba(0, 212, 170, 0.25);
}

.hiw-faq-q {
  padding: var(--space-md) var(--space-lg);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  transition: color var(--transition);
}

.hiw-faq-q::-webkit-details-marker { display: none; }

.hiw-faq-q::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.hiw-faq-item[open] .hiw-faq-q::after {
  content: '-';
  color: var(--accent);
}

.hiw-faq-q:hover {
  color: var(--text-primary);
}

.hiw-faq-a {
  padding: 0 var(--space-lg) var(--space-lg);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* CTA */
.hiw-cta {
  padding: var(--space-3xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hiw-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 50% 100%, rgba(0,212,170,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hiw-cta-title {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  position: relative;
}

.hiw-cta-sub {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  font-size: 0.95rem;
  position: relative;
}

.hiw-cta-btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--accent);
  color: var(--text-on-accent);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: opacity var(--transition);
  position: relative;
}

.hiw-cta-btn:hover {
  opacity: 0.88;
}


/* --- Animations --- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ═══ Share Card Modal ═══ */
.share-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-left: 12px;
  white-space: nowrap;
}
.share-trigger-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.share-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  padding: var(--space-md);
}
.share-modal {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 660px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.share-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition);
}
.share-modal-close:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}
.share-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}
.share-canvas-wrap {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: var(--space-md);
  background: var(--bg-secondary);
}
.share-actions {
  display: flex;
  gap: var(--space-sm);
}
.share-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.share-btn-copy {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.share-btn-copy:hover {
  background: var(--accent);
  color: var(--bg-primary);
}
.share-btn-download {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--bg-primary);
}
.share-btn-download:hover {
  opacity: 0.85;
}

/* ═══ GPU Suggestions (Model Detail) ═══ */
.detail-gpu-suggestions {
  margin-top: var(--space-lg);
}
.suggestion-context {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}
.suggestion-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}
.suggestion-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.suggestion-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.suggestion-tier-top::before { background: var(--accent); }
.suggestion-tier-value::before { background: var(--rating-a); }
.suggestion-tier-budget::before { background: var(--rating-b); }
.suggestion-tier-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}
.suggestion-tier-top .suggestion-tier-label { color: var(--accent); }
.suggestion-tier-value .suggestion-tier-label { color: var(--rating-a); }
.suggestion-tier-budget .suggestion-tier-label { color: var(--rating-b); }
.suggestion-tier-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}
.suggestion-gpu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.suggestion-gpu-name {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.suggestion-gpu-vram {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.suggestion-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}
.suggestion-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-md);
  flex-grow: 1;
}
.suggestion-stat {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
}
.suggestion-stat-better { color: var(--rating-a); }
.suggestion-stat-unlock { color: var(--accent); }
.suggestion-stat-warn { color: var(--rating-d); }
.suggestion-compare-btn {
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.suggestion-compare-btn:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

@media (max-width: 768px) {
  .suggestion-cards { grid-template-columns: 1fr; }
}

/* ═══ GPU Comparador ═══ */
.compare-section {
  padding: var(--space-xl) 0;
  min-height: 80vh;
}
.compare-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.compare-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}
.compare-selectors {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.compare-gpu-slot { flex: 1; }
.compare-slot-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.compare-gpu-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition);
}
.compare-gpu-select:focus { outline: none; border-color: var(--accent); }
.compare-vs {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  padding-top: 20px;
}
.compare-empty {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--text-muted);
}
.compare-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: var(--space-sm);
}
.compare-trigger-btn:hover { color: var(--accent); border-color: var(--accent); }
.compare-trigger-wrap { text-align: center; }

/* --- Loading Animation --- */
.cmp-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  gap: var(--space-lg);
}
.cmp-loading-gpus {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.cmp-loading-gpu {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}
.cmp-loading-vs {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}
.cmp-loading-bar-track {
  width: 300px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.cmp-loading-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 3px;
  transition: none;
}
.cmp-loading-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.cmp-loading-counter {
  font-weight: 700;
  color: var(--accent);
}

/* --- Dashboard --- */
.cmp-dashboard {
  margin-bottom: var(--space-xl);
}
.cmp-heroes {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-lg);
  align-items: center;
  margin-bottom: var(--space-xl);
}
.cmp-hero-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  position: relative;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.cmp-hero-winner {
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(0, 212, 170, 0.12);
}
.cmp-hero-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.03em;
}
.cmp-hero-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}
.cmp-hero-specs {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.cmp-hero-specs span + span::before {
  content: '·';
  margin-right: var(--space-sm);
}
.cmp-heroes-vs {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-muted);
  opacity: 0.5;
}

/* SVG Ring */
.cmp-ring-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: var(--space-md) auto;
}
.cmp-ring { width: 100%; height: 100%; }
.cmp-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}
.cmp-ring-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
}
.cmp-ring-a { stroke: var(--accent); }
.cmp-ring-b { stroke: #7c5cfc; }
.cmp-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.cmp-ring-number {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.cmp-ring-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.cmp-hero-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}
.cmp-hero-avg {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 8px 0 0;
}
.cmp-hero-avg strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Section Headers */
.cmp-section-header { margin-bottom: var(--space-md); }
.cmp-section-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); margin: 0 0 4px; }
.cmp-section-desc { font-size: 0.78rem; color: var(--text-muted); margin: 0; line-height: 1.4; }

/* Verdict */
.cmp-verdict {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.06), rgba(124, 92, 252, 0.06));
  border: 1px solid rgba(0, 212, 170, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-xl);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  text-align: center;
}
.cmp-verdict strong { color: var(--accent); }

/* Quick Stat Hints */
.cmp-quick-hint { font-size: 0.65rem; color: var(--text-muted); opacity: 0.7; display: block; margin-top: 2px; }

/* Rating Distribution — Stacked Bars */
.cmp-dist {
  margin-bottom: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.cmp-stacked-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cmp-stacked-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.cmp-stacked-gpu-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}
.cmp-stacked-gpu-avg {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}
.cmp-stacked-bar {
  display: flex;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
  gap: 2px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}
.cmp-stacked-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  transition: width 0.8s ease;
  cursor: default;
}
.cmp-stacked-seg:first-child { border-radius: 10px 0 0 10px; }
.cmp-stacked-seg:last-child { border-radius: 0 10px 10px 0; }
.cmp-stacked-seg:only-child { border-radius: 10px; }
.cmp-stacked-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.cmp-stacked-seg:hover { filter: brightness(1.15); }
.cmp-seg-S { background: var(--rating-s); }
.cmp-seg-A { background: var(--rating-a); }
.cmp-seg-B { background: var(--rating-b); }
.cmp-seg-C { background: var(--rating-c); }
.cmp-seg-D { background: var(--rating-d); }
.cmp-seg-F { background: var(--rating-f, #555); }

/* Rating Legend */
.cmp-rating-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: var(--space-md);
  padding: 10px 20px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.cmp-legend-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-right: 4px;
}
.cmp-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.cmp-legend-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
@media (max-width: 640px) {
  .cmp-rating-legend { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
}

/* Quick Stats */
.cmp-quick-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.cmp-quick-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  position: relative;
}
.cmp-quick-icon {
  display: block;
  font-size: 1rem;
  opacity: 0.5;
  margin-bottom: 4px;
}
.cmp-quick-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.cmp-quick-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}
.cmp-color-improved { color: var(--rating-a); }
.cmp-color-unlocked { color: var(--accent); }
.cmp-color-lost { color: var(--rating-d); }

/* --- Category Breakdown --- */
.cmp-categories {
  margin-bottom: var(--space-xl);
}
/* .cmp-categories-title replaced by .cmp-section-header */
.cmp-cat-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  overflow: hidden;
}
.cmp-cat-header {
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr 120px auto 20px;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition);
  font-family: inherit;
  text-align: left;
}
.cmp-cat-header:hover {
  background: var(--bg-secondary);
}
.cmp-cat-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}
.cmp-cat-icon svg { width: 100%; height: 100%; }
.cmp-cat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cmp-cat-name {
  font-size: 0.88rem;
  font-weight: 600;
}
.cmp-cat-count {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.cmp-cat-minibar {
  display: flex;
  flex-direction: column;
  gap: 3px;
  height: 14px;
}
.cmp-cat-bar-a, .cmp-cat-bar-b {
  height: 5px;
  border-radius: 3px;
  min-width: 4px;
  transition: width 0.5s ease;
}
.cmp-cat-bar-a { background: var(--accent); }
.cmp-cat-bar-b { background: #7c5cfc; }
.cmp-cat-scores {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.cmp-cat-score-a { color: var(--accent); }
.cmp-cat-score-b { color: #7c5cfc; }
.cmp-cat-score-vs { color: var(--text-muted); font-size: 0.65rem; font-weight: 500; }
.cmp-cat-win-a .cmp-cat-score-a { text-decoration: underline; }
.cmp-cat-win-b .cmp-cat-score-b { text-decoration: underline; }
.cmp-cat-chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.cmp-cat-header[aria-expanded="true"] .cmp-cat-chevron {
  transform: rotate(180deg);
}

/* Category Body */
.cmp-cat-body {
  border-top: 1px solid var(--border);
}
.cmp-cat-body-header {
  display: grid;
  grid-template-columns: 1fr auto auto 80px;
  gap: var(--space-md);
  padding: 8px var(--space-lg) 8px calc(var(--space-lg) + 36px);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

/* Model Rows */
.cmp-model-row {
  display: grid;
  grid-template-columns: 1fr auto auto 80px;
  gap: var(--space-md);
  align-items: center;
  padding: 10px var(--space-lg) 10px calc(var(--space-lg) + 36px);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.cmp-model-row:last-child { border-bottom: none; }
.cmp-model-row:hover { background: var(--bg-secondary); }
.cmp-model-row.active { background: var(--bg-secondary); }
.cmp-model-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}
.cmp-model-name small {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 4px;
}
.cmp-model-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.cmp-model-score {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  min-width: 22px;
}
/* Mini comparison bar — visual gap between two GPUs */
.cmp-minibar {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  min-width: 50px;
}
.cmp-minibar-a, .cmp-minibar-b {
  height: 4px;
  border-radius: 2px;
  min-width: 2px;
  transition: width 0.3s ease;
}
.cmp-minibar-a { background: var(--accent); }
.cmp-minibar-b { background: var(--compare-b, #8b5cf6); }

/* --- Inline Model Detail --- */
.cmp-model-detail {
  background: var(--bg-secondary);
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  animation: cmpDetailIn 0.2s ease;
}
@keyframes cmpDetailIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.cmp-detail-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}
.cmp-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
}
.cmp-detail-gpu-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}
.cmp-detail-badge {
  margin-bottom: var(--space-sm);
}
.cmp-detail-rating-big {
  width: 52px;
  height: 52px;
  font-size: 1.5rem;
  display: inline-flex;
}
.cmp-detail-score-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.cmp-detail-score-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}
.cmp-detail-score-fill {
  height: 100%;
  border-radius: 4px;
}
.cmp-detail-score-num {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  min-width: 45px;
  text-align: right;
}
.cmp-detail-specs {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  text-align: left;
}
.cmp-detail-spec {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cmp-detail-spec-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}
.cmp-detail-spec-value {
  font-size: 0.82rem;
  color: var(--text-primary);
}
.cmp-detail-vram-bar {
  height: 5px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 2px;
}
.cmp-detail-vram-fill {
  height: 100%;
  border-radius: 3px;
}
.cmp-detail-vram-fill.usage-low { background: var(--rating-a); }
.cmp-detail-vram-fill.usage-medium { background: var(--rating-b); }
.cmp-detail-vram-fill.usage-high { background: var(--rating-c); }
.cmp-detail-vram-fill.usage-critical { background: var(--rating-d); }
.cmp-detail-notes {
  margin-top: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cmp-detail-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 4px 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
}

/* --- Compare Mobile --- */
@media (max-width: 768px) {
  .compare-selectors { flex-direction: column; }
  .compare-vs { padding-top: 0; }
  .cmp-heroes { grid-template-columns: 1fr; gap: var(--space-md); }
  .cmp-heroes-vs { text-align: center; }
  .cmp-quick-stats { grid-template-columns: repeat(2, 1fr); }
  .cmp-cat-header { grid-template-columns: 24px 1fr 20px; }
  .cmp-cat-minibar, .cmp-cat-scores { display: none; }
  .cmp-cat-body-header { display: none; }
  .cmp-model-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding-left: var(--space-lg);
  }
  .cmp-model-row::after {
    content: attr(data-model-id);
    display: none;
  }
  .cmp-model-rating { justify-content: flex-start; }
  .cmp-detail-cards { grid-template-columns: 1fr; }
  .cmp-loading-bar-track { width: 80%; max-width: 280px; }
}

/* Stagger card animations */
/* --- Responsive --- */
@media (max-width: 1024px) {
  .model-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
  .rec-scroll {
    grid-template-columns: repeat(2, 1fr);
  }
  .list-header,
  .model-list-item {
    grid-template-columns: 36px 1fr 64px 28px 140px 64px 28px;
    gap: 6px;
  }
  .list-col-speed, .lh-speed { display: none; }
}

@media (max-width: 768px) {
  .rec-toggle { display: inline-flex; }

  .hero { padding: var(--space-2xl) 0 var(--space-xl); }
  .hero-title { font-size: 2.2rem; }
  .nav-brand { font-size: 1rem; }

  .hero-features { grid-template-columns: 1fr; gap: var(--space-sm); }
  .hero-feature-card { padding: var(--space-md); }
  .hero-stats-row { gap: var(--space-lg); }
  .hero-stat-divider { height: 28px; }
  .hero-seo-blurb { font-size: 0.78rem; }

  /* Compact hero after GPU selection */
  .hero.hero-compact {
    padding: var(--space-md) 0 var(--space-sm);
  }
  .hero.hero-compact .hero-title,
  .hero.hero-compact .hero-subtitle,
  .hero.hero-compact .compare-trigger-wrap,
  .hero.hero-compact .gpu-selector-label {
    display: none;
  }

  /* Hide recommendations and rating legend on mobile — cards already show ratings */
  #recommendations { display: none !important; }
  #rating-legend { display: none !important; }

  .hiw-hero { padding: var(--space-2xl) 0 var(--space-xl); }
  .hiw-steps-grid { grid-template-columns: 1fr; }
  .hiw-ratings-grid { grid-template-columns: 1fr; }
  .hiw-formats-grid { grid-template-columns: 1fr; }

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

  .rec-header { flex-direction: column; }
  .gpu-stats-inline { width: 100%; justify-content: center; }

  /* Compact sticky filter bar */
  .filters-section {
    padding: var(--space-xs) 0 0;
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-xs);
    padding-bottom: var(--space-xs);
  }

  /* Single-row scrollable category tabs */
  .category-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    gap: var(--space-xs);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .category-tabs::-webkit-scrollbar { display: none; }
  .category-tab { flex-shrink: 0; }

  .rating-legend-strip {
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 16px;
  }

  .legend-strip-items {
    justify-content: center;
  }

  /* Search + sort on same row */
  .filters-controls {
    justify-content: stretch;
    min-width: 0;
    max-width: 100%;
    flex-wrap: nowrap;
    width: 100%;
    box-sizing: border-box;
    gap: var(--space-xs);
  }

  .search-wrapper { max-width: none; flex: 1 1 0; min-width: 0; box-sizing: border-box; }
  .search-input { font-size: 16px; max-width: 100%; box-sizing: border-box; } /* Prevents iOS zoom on focus */

  .sort-wrapper { flex: 0 0 auto; min-width: 0; }
  .sort-select { min-width: 0; width: auto; font-size: 0.8rem; padding: 8px 10px; }

  /* Hide view toggle and results summary on mobile */
  .view-toggle { display: none; }
  .results-summary { display: none; }

  .model-grid {
    grid-template-columns: 1fr;
  }

  .card-info-row {
    flex-wrap: wrap;
  }

  .list-header,
  .model-list-item {
    grid-template-columns: 36px 1fr 100px 50px 60px 28px;
    gap: 4px;
    padding: 6px var(--space-sm);
  }

  .list-col-type, .list-col-size,
  .lh-type, .lh-size { display: none; }

  .list-header { font-size: 0.6rem; }

  .model-list-item .rating-badge {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .list-col-name .card-name { font-size: 0.8rem; }
  .list-col-name .card-meta { display: none; }
  .list-col-vram .vram-value { font-size: 0.7rem; min-width: 42px; }
  .list-col-format, .list-col-speed { font-size: 0.7rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-md); }

  .rec-scroll { grid-template-columns: 1fr; }

  .category-tabs {
    gap: 2px;
  }

  .category-tab {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .rating-badge {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }
}

/* ============================================
   Model Detail View
   ============================================ */

.detail-section {
}

.detail-container {
  max-width: 920px;
  margin: 0 auto;
  padding: var(--space-xl) 0 var(--space-3xl);
}

/* Back button */
.detail-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 4px 0;
  font-size: 0.82rem;
  cursor: pointer;
  transition: color var(--transition);
  margin-bottom: var(--space-lg);
}
.detail-back-btn:hover {
  color: var(--text-primary);
}

/* === Hero Banner — verdict + title + download === */
.detail-hero {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  margin-bottom: var(--space-lg);
  overflow: hidden;
}

.detail-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Rating-colored top stripe */
.detail-hero.hero-S::before { background: var(--rating-s); }
.detail-hero.hero-A::before { background: var(--rating-a); }
.detail-hero.hero-B::before { background: var(--rating-b); }
.detail-hero.hero-C::before { background: var(--rating-c); }
.detail-hero.hero-D::before { background: var(--rating-d); }
.detail-hero.hero-F::before { background: var(--rating-f); }

/* Subtle gradient wash behind hero */
.detail-hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  pointer-events: none;
  opacity: 0.04;
  border-radius: var(--radius-lg);
}
.detail-hero.hero-S::after { background: radial-gradient(ellipse at top right, var(--rating-s), transparent 70%); }
.detail-hero.hero-A::after { background: radial-gradient(ellipse at top right, var(--rating-a), transparent 70%); }
.detail-hero.hero-B::after { background: radial-gradient(ellipse at top right, var(--rating-b), transparent 70%); }
.detail-hero.hero-C::after { background: radial-gradient(ellipse at top right, var(--rating-c), transparent 70%); }
.detail-hero.hero-D::after { background: radial-gradient(ellipse at top right, var(--rating-d), transparent 70%); }
.detail-hero.hero-F::after { background: radial-gradient(ellipse at top right, var(--rating-f), transparent 70%); }

.detail-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
  position: relative;
  z-index: 1;
}

.detail-title-group {
  flex: 1;
  min-width: 0;
}

.detail-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 6px 0 4px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.detail-meta {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.detail-description {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 10px;
  max-width: 520px;
}

/* Verdict card — sits top-right of hero */
.detail-verdict {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  position: relative;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@supports not (backdrop-filter: blur(8px)) {
  .detail-verdict {
    background: rgba(10, 12, 16, 0.85);
  }
}

.verdict-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.verdict-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.verdict-label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.verdict-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.verdict-score {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1px;
}

/* Verdict color variations */
.verdict-S .verdict-label { color: var(--rating-s); }
.verdict-S .verdict-icon { background: rgba(0, 230, 118, 0.12); color: var(--rating-s); }

.verdict-A .verdict-label { color: var(--rating-a); }
.verdict-A .verdict-icon { background: rgba(102, 187, 106, 0.12); color: var(--rating-a); }

.verdict-B .verdict-label { color: var(--rating-b); }
.verdict-B .verdict-icon { background: rgba(253, 216, 53, 0.12); color: var(--rating-b); }

.verdict-C .verdict-label { color: var(--rating-c); }
.verdict-C .verdict-icon { background: rgba(255, 167, 38, 0.12); color: var(--rating-c); }

.verdict-D .verdict-label { color: var(--rating-d); }
.verdict-D .verdict-icon { background: rgba(239, 83, 80, 0.12); color: var(--rating-d); }

.verdict-F .verdict-label { color: var(--rating-f); }
.verdict-F .verdict-icon { background: rgba(120, 144, 156, 0.12); color: var(--rating-f); }

/* Download button — bottom of hero, full width */
.detail-hero-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.detail-hero-meta-pills {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.detail-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-meta-pill svg {
  opacity: 0.6;
}

.detail-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: opacity var(--transition);
  flex-shrink: 0;
}

.detail-download-btn:hover {
  opacity: 0.88;
}

.detail-download-btn svg {
  opacity: 0.8;
}

/* === Main 2-column grid === */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

/* === Panel shared styles === */
.detail-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.detail-panel-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-panel-title::before {
  display: none;
}

/* === Format Options Table === */
.detail-formats {
  margin-bottom: 0;
}

.detail-format-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.detail-format-table th {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 4px 10px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.detail-format-table th:last-child {
  text-align: center;
}

.format-row td {
  padding: 12px 4px;
  border-bottom: 1px solid rgba(37, 42, 58, 0.4);
  font-size: 0.84rem;
  color: var(--text-primary);
  transition: opacity 0.15s ease;
}
.format-row td:first-child {
  padding-left: 10px;
}

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

.fmt-name {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.fmt-vram {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.fmt-quality {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quality-dots {
  display: flex;
  gap: 3px;
}

.quality-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.15s ease;
}

.quality-dot.filled {
  background: var(--accent);
  border-color: var(--accent);
}

.quality-label {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.fmt-fit {
  text-align: center;
  font-size: 1rem;
}

.fit-best {
  color: var(--rating-s);
  font-size: 1.1rem;
  filter: drop-shadow(0 0 4px rgba(0, 230, 118, 0.3));
}

.fit-yes {
  color: var(--rating-a);
}

.fit-no {
  color: var(--rating-f);
}

.format-best {
  background: rgba(0, 212, 170, 0.04);
}

.format-best td:first-child {
  position: relative;
}

.format-best td:first-child::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.format-no-fit td {
  opacity: 0.38;
}

/* === Hardware Panel === */
.detail-hardware {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.detail-hw-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.detail-hw-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-hw-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-hw-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.detail-hw-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.detail-hw-highlight {
  color: var(--accent);
  font-weight: 700;
}

.detail-hw-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-md) 0;
}

.detail-hw-result {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* === Bottom info grid (specs + platform + tips) === */
.detail-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

/* Specs */
.detail-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px var(--space-lg);
}

.detail-spec {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.detail-spec-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-spec-value {
  font-size: 0.86rem;
  color: var(--text-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-popularity-bar {
  width: 52px;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.detail-popularity-fill {
  display: block;
  height: 100%;
  background: var(--text-secondary);
  border-radius: 3px;
}

/* Platform Support */
.detail-platform-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}

.platform-badge.supported {
  color: var(--accent);
  border-color: rgba(0, 212, 170, 0.2);
  background: rgba(0, 212, 170, 0.05);
}

.platform-badge.unsupported {
  color: var(--text-muted);
  opacity: 0.4;
}

/* Tips */
.detail-tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-tips-list li {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
}

.detail-tips-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.tip-warning {
  color: var(--rating-c);
}

/* Clickable cards/rows */
.model-card,
.model-list-item {
  cursor: pointer;
}

/* === Detail responsive === */
@media (max-width: 768px) {
  .detail-container {
    padding: var(--space-md) 0;
  }

  .detail-hero {
    padding: var(--space-lg) var(--space-md);
  }

  .detail-hero-top {
    flex-direction: column;
  }

  .detail-verdict {
    align-self: stretch;
  }

  .detail-name {
    font-size: 1.3rem;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-bottom-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero-actions {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: stretch;
  }

  .detail-download-btn {
    justify-content: center;
  }

  .detail-specs-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Accessibility: Focus Visible --- */
.model-card:focus-visible,
.model-list-item:focus-visible,
.rec-card:focus-visible,
.category-tab:focus-visible,
.view-toggle:focus-visible,
.gpu-dropdown-trigger:focus-visible,
.floating-help:focus-visible,
.back-to-top:focus-visible,
.detail-back-btn:focus-visible,
.hiw-faq-q:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Accessibility: Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Touch Devices: Disable hover effects --- */
@media (hover: none) {
  .model-card:hover,
  .model-list-item:hover,
  .rec-card:hover,
  .hero-feature-card:hover,
  .card-incompatible:hover,
  .card-perfect:hover {
    transform: none;
    box-shadow: none;
  }
  .floating-help:hover,
  .back-to-top:hover {
    transform: none;
  }
  .floating-help:hover::after {
    opacity: 0;
  }
  .category-tab {
    min-height: 44px;
    padding: 10px 18px;
  }
  .floating-help,
  .back-to-top {
    width: 48px;
    height: 48px;
  }
}

/* --- Light Mode --- */
@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f5f6fa;
    --bg-secondary: #ebedf3;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f1f5;
    --bg-input: #ffffff;
    --border: #d5d9e2;
    --border-accent: #c0c6d4;

    --accent: #009b7d;
    --accent-secondary: #0090b0;
    --accent-gradient: var(--accent);
    --accent-glow: rgba(0, 0, 0, 0.06);
    --text-on-accent: #ffffff;

    --rating-s: #00a858;
    --rating-a: #43a047;
    --rating-b: #f9a825;
    --rating-c: #ef6c00;
    --rating-d: #d32f2f;
    --rating-f: #607d8b;

    --text-primary: #1a1d26;
    --text-secondary: #4a5068;
    --text-muted: #6b7186;
  }
  body {
    color-scheme: light;
  }
  .hero-bg {
    opacity: 0.03;
  }
  .loading-overlay {
    background: var(--bg-primary);
  }
  .site-nav {
    background: rgba(245, 246, 250, 0.9);
    border-bottom-color: var(--border);
  }
  .model-card,
  .model-list-item {
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  }
  .gpu-dropdown-menu {
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  }
  .floating-help,
  .back-to-top {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  .rec-card {
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  }
  .detail-verdict {
    background: rgba(255,255,255,0.7);
  }
  .vram-bar-container {
    background: var(--bg-secondary);
  }
  .category-tab.active {
    background: var(--accent);
    color: #ffffff;
  }
  .gpu-dropdown-option:hover,
  .gpu-dropdown-option.focused {
    background: rgba(0,0,0,0.04);
  }
  .suggestion-stat {
    background: rgba(0, 0, 0, 0.05);
  }
  .suggestion-card {
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  }
}

/* --- Print Styles --- */
@media print {
  body {
    background: white;
    color: black;
  }
  .site-nav,
  .hero-bg,
  .floating-buttons,
  .search-wrapper,
  .sort-wrapper,
  .view-toggle,
  .back-to-top,
  .floating-help,
  .loading-overlay,
  #gpu-dropdown,
  .gpu-selector-wrapper,
  .hero-landing,
  .recommendations-section,
  .rating-legend-section {
    display: none !important;
  }
  .model-card,
  .model-list-item {
    break-inside: avoid;
    border: 1px solid #ccc;
    background: white;
    color: black;
  }
  .rating-badge {
    border: 1px solid currentColor;
  }
  .vram-bar-container {
    border: 1px solid #ccc;
  }
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
  .footer {
    background: white;
    color: black;
    border-top: 1px solid #ccc;
  }
}
