/* ============================================================
   Laptop Comparison App — Design System
   index.css — Full styles including dark mode, animations
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700;800&display=swap");

/* ── CSS Custom Properties ────────────────────────────────── */
:root {
  /* Light Theme */
  --bg-primary: #f0f2f8;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.6);
  --bg-filter: #f8faff;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;

  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-card: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
  --gradient-accent: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-gaming: linear-gradient(135deg, #f97316, #ef4444);
  --gradient-student: linear-gradient(135deg, #10b981, #06b6d4);
  --gradient-budget: linear-gradient(135deg, #f59e0b, #f97316);

  --border: #e2e8f0;
  --border-subtle: rgba(99, 102, 241, 0.15);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px rgba(99, 102, 241, 0.1);
  --shadow-lg: 0 8px 40px rgba(99, 102, 241, 0.18);
  --shadow-hover: 0 20px 60px rgba(99, 102, 241, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --nav-height: 70px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-primary: #08090f;
  --bg-secondary: #111827;
  --bg-card: #161b2e;
  --bg-nav: rgba(8, 9, 15, 0.9);
  --bg-glass: rgba(22, 27, 46, 0.7);
  --bg-filter: #0f1525;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

  --border: #1e2a42;
  --border-subtle: rgba(99, 102, 241, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 20px 60px rgba(99, 102, 241, 0.3);
  --gradient-card: linear-gradient(135deg, #161b2e 0%, #1a2035 100%);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background var(--transition-slow), color var(--transition-slow);
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
  transition: background var(--transition-slow);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}
.nav-logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--gradient-accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  -webkit-text-fill-color: white;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  background: var(--border-subtle);
  color: var(--accent-primary);
}

.nav-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.compare-badge {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  cursor: pointer;
  transition: all var(--transition);
}
.compare-badge:hover { background: var(--accent-primary); color: white; }
.compare-count {
  background: var(--accent-primary);
  color: white;
  border-radius: 50%;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.compare-badge:hover .compare-count { background: rgba(255,255,255,0.3); }

.dark-toggle {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--border-subtle);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.dark-toggle:hover { background: var(--accent-primary); color: white; transform: rotate(20deg); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: var(--gradient-hero);
  padding: 64px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%),
              radial-gradient(circle at 70% 20%, rgba(255,255,255,0.06) 0%, transparent 50%);
}
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.9);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero h1 {
  font-family: "Outfit", sans-serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 16px;
}
.hero h1 span { color: rgba(255, 200, 100, 1); }
.hero p {
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
}
.btn-white { background: #fff; color: var(--accent-primary); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.2); }
.btn-outline { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.btn-outline:hover { background: rgba(255,255,255,0.22); transform: translateY(-2px); }
.btn-primary { background: var(--gradient-accent); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost { background: var(--border-subtle); color: var(--accent-primary); border: 1px solid var(--border-subtle); }
.btn-ghost:hover { background: var(--accent-primary); color: white; transform: translateY(-2px); }

/* ── Stats Strip ──────────────────────────────────────────── */
.stats-strip {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 22px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-value {
  font-family: "Outfit", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Layout ───────────────────────────────────────────────── */
.page-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
}

/* ── Filter Panel ─────────────────────────────────────────── */
.filter-panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  height: fit-content;
  position: sticky;
  top: calc(var(--nav-height) + 16px);
}
.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.filter-title {
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-clear {
  font-size: 0.8rem;
  color: var(--accent-primary);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.filter-clear:hover { background: var(--border-subtle); }

.filter-group { margin-bottom: 22px; }
.filter-group-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.filter-search-wrap { position: relative; }
.filter-search-wrap input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-filter);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all var(--transition);
}
.filter-search-wrap input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.filter-search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.filter-chips { display: flex; flex-direction: column; gap: 6px; }
.filter-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.filter-chip:hover { background: var(--border-subtle); color: var(--accent-primary); }
.filter-chip.active { background: var(--border-subtle); color: var(--accent-primary); border-color: rgba(99, 102, 241, 0.2); }
.filter-chip input[type="checkbox"] { accent-color: var(--accent-primary); width: 16px; height: 16px; }

/* Price Range Slider */
.price-range {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.price-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.price-input-wrap { position: relative; }
.price-input-wrap span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.8rem; font-weight: 600; }
.price-input-wrap input {
  width: 100%;
  padding: 8px 8px 8px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-filter);
  color: var(--text-primary);
  font-size: 0.8rem;
}
.price-input-wrap input:focus { outline: none; border-color: var(--accent-primary); }
input[type="range"] {
  width: 100%;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

/* ── Laptop Grid ──────────────────────────────────────────── */
.laptops-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.laptops-count {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.laptops-count span { font-weight: 700; color: var(--text-primary); }
.sort-select {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
}

.laptop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ── Laptop Card ──────────────────────────────────────────── */
.laptop-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--transition-slow);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.laptop-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(99, 102, 241, 0.3);
}
.laptop-card.in-compare {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3), var(--shadow-md);
}

.card-image-wrap {
  position: relative;
  background: var(--gradient-card);
  padding: 20px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-image-wrap img {
  height: 120px;
  width: 100%;
  object-fit: contain;
  transition: transform var(--transition-slow);
}
.laptop-card:hover .card-image-wrap img { transform: scale(1.06); }

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-gaming { background: var(--gradient-gaming); color: white; }
.badge-student { background: var(--gradient-student); color: white; }
.badge-budget { background: var(--gradient-budget); color: white; }
.badge-premium { background: var(--gradient-accent); color: white; }
.badge-work { background: linear-gradient(135deg, #0ea5e9, #6366f1); color: white; }

.compare-check {
  position: absolute;
  top: 12px; right: 12px;
  width: 30px; height: 30px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 2;
}
.compare-check:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.laptop-card.in-compare .compare-check {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.card-brand {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 4px;
}
.card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
  flex: 1;
}
.spec-item {
  background: var(--bg-filter);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
}
.spec-label { font-size: 0.65rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.spec-value { font-size: 0.78rem; font-weight: 600; color: var(--text-primary); }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.card-price {
  font-family: "Outfit", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-warning);
}

.card-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}
.btn-detail {
  flex: 1;
  padding: 9px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  background: var(--gradient-accent);
  color: white;
  transition: all var(--transition);
}
.btn-detail:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Performance Bar ──────────────────────────────────────── */
.perf-bar-wrap { padding: 0 16px 14px; }
.perf-bar-label { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 4px; display: flex; justify-content: space-between; }
.perf-bar-track { height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; }
.perf-bar-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 4px;
  transition: width 1s ease;
}

/* ── No Results ───────────────────────────────────────────── */
.no-results {
  text-align: center;
  padding: 64px 24px;
  grid-column: 1 / -1;
}
.no-results-icon { font-size: 4rem; margin-bottom: 16px; }
.no-results h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.no-results p { color: var(--text-secondary); }

/* ── Section titles ───────────────────────────────────────── */
.section-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.section-sub { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 28px; }

/* ── Compare Page ─────────────────────────────────────────── */
.compare-container { max-width: 1400px; margin: 0 auto; padding: 32px 24px; }
.compare-hero {
  text-align: center;
  margin-bottom: 32px;
}
.compare-tray {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 32px;
  overflow-x: auto;
}
.tray-slot {
  flex: 1;
  min-width: 200px;
  min-height: 100px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 20px;
  text-align: center;
  transition: all var(--transition);
}
.tray-slot.filled {
  border-color: var(--accent-primary);
  border-style: solid;
  background: var(--border-subtle);
  color: var(--text-primary);
}
.tray-slot .tray-laptop-name { font-weight: 700; font-size: 0.9rem; }
.tray-slot .tray-laptop-price { color: var(--accent-primary); font-weight: 700; }
.tray-remove { color: var(--accent-danger); cursor: pointer; font-size: 1rem; }

.compare-table-wrap { overflow-x: auto; }
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.compare-table th {
  padding: 20px 16px;
  background: var(--gradient-card);
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.compare-table td {
  padding: 14px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  vertical-align: middle;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table .row-label {
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-filter);
  white-space: nowrap;
  padding-left: 20px;
}
.compare-table .best-val { color: var(--accent-success); font-weight: 700; }
.compare-table tbody tr:hover td { background: rgba(99, 102, 241, 0.04); }

.score-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1rem;
  background: var(--gradient-accent);
  color: white;
}

/* ── Detail Page ──────────────────────────────────────────── */
.detail-container { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
.detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}
.detail-breadcrumb a { color: var(--accent-primary); }
.detail-breadcrumb span { font-weight: 500; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.detail-image-panel {
  background: var(--gradient-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  min-height: 360px;
}
.detail-image-panel img { max-height: 280px; object-fit: contain; }

.detail-info { display: flex; flex-direction: column; gap: 20px; }
.detail-brand { color: var(--accent-primary); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.detail-name {
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
}
.detail-price {
  font-family: "Outfit", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.detail-rating { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.stars { color: var(--accent-warning); letter-spacing: 2px; }

.detail-quick-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.quick-spec-item {
  background: var(--bg-filter);
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid var(--border);
}
.quick-spec-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; margin-bottom: 2px; letter-spacing: 0.04em; }
.quick-spec-value { font-size: 0.9rem; font-weight: 600; }

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

/* Performance Score Card */
.perf-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 28px;
  margin-bottom: 28px;
}
.perf-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.perf-score-big {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: var(--gradient-accent);
  font-family: "Outfit", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.perf-breakdown { flex: 1; margin-left: 24px; }
.perf-bar-row { margin-bottom: 14px; }
.perf-bar-row-header { display: flex; justify-content: space-between; font-size: 0.82rem; font-weight: 600; margin-bottom: 5px; }
.perf-bar-track2 { height: 8px; background: var(--border); border-radius: 8px; overflow: hidden; }
.perf-bar-fill2 { height: 100%; border-radius: 8px; transition: width 1.2s ease; }
.fill-cpu { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.fill-ram { background: linear-gradient(90deg, #06b6d4, #0ea5e9); }
.fill-gpu { background: linear-gradient(90deg, #f97316, #ef4444); }
.fill-storage { background: linear-gradient(90deg, #10b981, #06b6d4); }

/* Full Specs Table */
.specs-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 28px;
  margin-bottom: 28px;
}
.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.spec-row {
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: var(--bg-filter);
  border-radius: var(--radius-sm);
}
.spec-row-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.spec-row-value { font-size: 0.9rem; font-weight: 600; }

/* ── Best Page ────────────────────────────────────────────── */
.best-container { max-width: 1400px; margin: 0 auto; padding: 32px 24px; }
.best-hero {
  text-align: center;
  padding: 48px 24px;
  background: var(--gradient-hero);
  border-radius: var(--radius-xl);
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.best-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
}
.best-hero h1 { font-family: "Outfit", sans-serif; font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; color: white; }
.best-hero p { color: rgba(255,255,255,0.8); margin-top: 12px; font-size: 1rem; }

.best-section { margin-bottom: 48px; }
.best-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.section-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.icon-budget { background: var(--gradient-budget); }
.icon-gaming { background: var(--gradient-gaming); }
.icon-student { background: var(--gradient-student); }

.best-section-title { font-family: "Outfit", sans-serif; font-size: 1.4rem; font-weight: 800; }
.best-section-sub { color: var(--text-muted); font-size: 0.82rem; }

.best-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.winner-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 12px;
}

/* ── Loading ──────────────────────────────────────────────── */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  gap: 16px;
  grid-column: 1 / -1;
}
.spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--text-muted); font-size: 0.9rem; }

/* ── Toast Notification ───────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 9999;
  transform: translateX(200%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 340px;
}
.toast.visible { transform: translateX(0); }
.toast-icon { font-size: 1.1rem; }
.toast-success { border-left: 3px solid var(--accent-success); }
.toast-error { border-left: 3px solid var(--accent-danger); }
.toast-info { border-left: 3px solid var(--accent-primary); }

/* ── Compare Tray Fixed Bar ───────────────────────────────── */
.compare-bar {
  position: fixed;
  bottom: 0; left: 0;
  width: 100%;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 900;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-wrap: wrap;
}
.compare-bar.visible { transform: translateY(0); }
.compare-bar-label { font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.compare-bar-items { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.compare-bar-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--border-subtle);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
}
.compare-bar-chip button { font-size: 0.85rem; color: var(--text-muted); transition: color var(--transition); line-height: 1; }
.compare-bar-chip button:hover { color: var(--accent-danger); }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  margin-top: 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-logo {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.fade-in-up { animation: fadeInUp 0.4s ease forwards; }
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .page-content { grid-template-columns: 1fr; }
  .filter-panel { position: static; display: none; }
  .filter-panel.mobile-open { display: block; }
  .detail-grid { grid-template-columns: 1fr; }
  .perf-breakdown { margin-left: 0; margin-top: 20px; }
  .perf-card .perf-card-header { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .laptop-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
  .specs-grid { grid-template-columns: 1fr; }
  .compare-table { font-size: 0.8rem; }
  .compare-table th, .compare-table td { padding: 10px 10px; }
  .detail-quick-specs { grid-template-columns: 1fr; }
  .stats-strip { gap: 24px; }
}

@media (max-width: 480px) {
  .hero { padding: 44px 16px; }
  .hero h1 { font-size: 1.8rem; }
  .compare-container, .detail-container, .best-container { padding: 20px 16px; }
  .best-grid, .laptop-grid { grid-template-columns: 1fr; }
  .filter-search-wrap input { font-size: 16px; } /* Prevent iOS zoom */
}

/* ── Mobile Nav Drawer ────────────────────────────────────── */
.mobile-nav {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 999;
  display: none;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-lg);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: all var(--transition);
}
.mobile-nav a:hover, .mobile-nav a.active {
  background: var(--border-subtle);
  color: var(--accent-primary);
}

/* ── Mobile Filter Button ─────────────────────────────────── */
.mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
}
.mobile-filter-btn:hover { background: var(--border-subtle); color: var(--accent-primary); }
@media (max-width: 1024px) { .mobile-filter-btn { display: flex; } }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Utility ──────────────────────────────────────────────── */
.pb-compare { padding-bottom: 80px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
/* ── Loading Spinner ───────────────────────────────────────── */
.loading-spinner-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: inherit;
  animation: fadeIn 0.3s ease;
}

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

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

/* ── Toast Overlay Improvements ───────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  padding: 12px 24px;
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success { border-left: 4px solid var(--accent-success); }
.toast.error { border-left: 4px solid var(--accent-danger); }
.toast.info { border-left: 4px solid var(--accent-primary); }
