/* ===== VARIABLES ===== */
:root {
  --bg: #0d0d0f;
  --bg-surface: #161619;
  --bg-surface-2: #1e1e22;
  --accent: #ff4d00;
  --accent-dim: rgba(255, 77, 0, 0.12);
  --text-primary: #f0f0f2;
  --text-secondary: #a0a0b0;
  --text-muted: #60606e;
  --good: #00e676;
  --good-dim: rgba(0, 230, 118, 0.15);
  --poor: #ff5252;
  --poor-dim: rgba(255, 82, 82, 0.15);
  --border: #252529;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 13, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.5px;
}
.logo-rank { color: var(--text-primary); }
.logo-hr { color: var(--accent); }
.nav-tagline {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 140px 24px 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 77, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 77, 0, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
}
.hero-glow {
  position: absolute;
  top: -20%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 77, 0, 0.07) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-content {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(255, 77, 0, 0.3);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(48px, 5.5vw, 80px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.headline-accent { color: var(--accent); }
.hero-sub {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 420px;
}
.hero-search-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}
.search-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.search-field {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.search-icon { color: var(--text-muted); font-size: 16px; }
.search-placeholder { font-size: 14px; color: var(--text-muted); }
.quick-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 6px 14px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.pill:hover { border-color: var(--accent); color: var(--accent); }
.hero-preview-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.preview-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.preview-row { margin-bottom: 14px; }
.preview-row:last-child { margin-bottom: 0; }
.prod-name { font-size: 14px; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; }
.prod-score { display: flex; align-items: baseline; gap: 2px; margin-bottom: 3px; }
.score { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--good); }
.score.poor { color: var(--poor); }
.score-label { font-size: 12px; color: var(--text-muted); }
.prod-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.prod-bar { height: 3px; background: var(--bg-surface-2); border-radius: 2px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--good); border-radius: 2px; transition: width 0.6s ease; }
.bar-fill.poor { background: var(--poor); }

/* ===== STATS ===== */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 24px;
}
.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat-item { text-align: center; padding: 0 20px; }
.stat-item:first-child { text-align: left; }
.stat-item:last-child { text-align: right; }
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
}
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }
.stat-divider { width: 1px; background: var(--border); margin: 0 10px; }

/* ===== LEADERBOARD ===== */
.leaderboard {
  padding: 100px 24px;
}
.leaderboard-inner { max-width: 1200px; margin: 0 auto; }
.section-header { margin-bottom: 60px; }
.section-tag {
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 14px;
  font-weight: 600;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  color: var(--text-primary);
}
.leaderboard-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lb-card {
  display: grid;
  grid-template-columns: 40px 1fr 70px 160px 100px;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.2s ease;
}
.lb-card:hover { border-color: rgba(255, 77, 0, 0.3); background: var(--bg-surface-2); }
.lb-card.top-card { border-color: rgba(255, 77, 0, 0.4); }
.lb-rank {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}
.lb-name { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.lb-batch { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.lb-score {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--good);
  text-align: right;
}
.lb-bar-wrap { height: 4px; background: var(--bg-surface-2); border-radius: 2px; overflow: hidden; }
.lb-bar { height: 100%; background: var(--accent); border-radius: 2px; }
.lb-count { font-size: 11px; color: var(--text-muted); text-align: right; }

/* ===== FEATURES ===== */
.features {
  padding: 100px 24px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.features-inner { max-width: 1200px; margin: 0 auto; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}
.feature-card {
  padding: 36px 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.25s ease;
}
.feature-card:hover { border-color: rgba(255, 77, 0, 0.25); transform: translateY(-2px); }
.feature-icon {
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 20px;
  font-weight: 300;
}
.feature-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.feature-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ===== HOW IT WORKS ===== */
.how-it-works { padding: 100px 24px; }
.hiw-inner { max-width: 1200px; margin: 0 auto; }
.steps {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  margin-top: 60px;
}
.step { flex: 1; }
.step-number {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -2px;
  opacity: 0.8;
  line-height: 1;
  margin-bottom: 20px;
}
.step-connector {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-bottom: 24px;
}
.step-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.step-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.step-arrow {
  font-size: 28px;
  color: var(--text-muted);
  padding-top: 40px;
  flex-shrink: 0;
}

/* ===== CLOSING ===== */
.closing {
  padding: 120px 24px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}
.closing-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.closing-quote {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.closing-quote .accent { color: var(--accent); display: block; }
.closing-sub { font-size: 16px; color: var(--text-muted); }

/* ===== FOOTER ===== */
.footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
}
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.footer-brand .nav-logo { font-size: 18px; }
.footer-tagline { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.footer-note { font-size: 12px; color: var(--text-muted); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .lb-card { grid-template-columns: 36px 1fr 60px 120px 80px; }
}

@media (max-width: 768px) {
  .hero-content { grid-template-columns: 1fr; gap: 48px; }
  .hero-headline { font-size: 42px; }
  .hero-right { display: none; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 32px 0; }
  .stat-item { text-align: left; }
  .stat-divider { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .step-arrow { display: none; }
  .lb-card { grid-template-columns: 30px 1fr 50px; }
  .lb-card .lb-bar-wrap { display: none; }
  .lb-card .lb-count { display: none; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .footer-brand { text-align: center; }
}

@media (max-width: 480px) {
  .hero { padding: 120px 16px 60px; }
  .stats { padding: 32px 16px; }
  .leaderboard { padding: 60px 16px; }
  .features { padding: 60px 16px; }
  .how-it-works { padding: 60px 16px; }
  .closing { padding: 80px 16px; }
  .lb-card { padding: 14px 16px; gap: 10px; }
  .lb-score { font-size: 18px; }
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 7px 14px; font-size: 12px; }

/* ===== REVIEWS PAGE ===== */
.reviews-page { padding: 120px 24px 100px; }
.reviews-inner { max-width: 1200px; margin: 0 auto; }
.reviews-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
  margin-top: 48px;
}

/* Filter sidebar */
.filter-sidebar { position: sticky; top: 90px; }
.sidebar-section { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.sidebar-title { font-family: var(--font-display); font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }

.search-form .search-field {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-body);
  width: 100%;
}
.search-form .search-field:focus { outline: none; border-color: var(--accent); }

.agent-filter-list { display: flex; flex-direction: column; gap: 2px; }
.agent-filter-item {
  display: block;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
}
.agent-filter-item:hover { background: var(--bg-surface-2); color: var(--text-primary); }
.agent-filter-item.active { background: var(--accent-dim); color: var(--accent); font-weight: 500; }

.top-products-list { display: flex; flex-direction: column; gap: 10px; }
.top-product-item { display: flex; align-items: center; justify-content: space-between; }
.top-product-name { font-size: 12px; color: var(--text-secondary); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-product-score { font-family: var(--font-display); font-size: 14px; font-weight: 700; }
.top-product-score.good { color: var(--good); }
.top-product-score.mid { color: #ff9800; }
.top-product-score.poor { color: var(--poor); }

/* Reviews main area */
.reviews-main { min-width: 0; }
.reviews-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.sort-pills { display: flex; gap: 8px; }
.sort-pills .pill { padding: 6px 14px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 100px; font-size: 12px; color: var(--text-secondary); text-decoration: none; transition: all 0.2s ease; }
.sort-pills .pill:hover { border-color: var(--accent); color: var(--accent); }
.sort-pills .pill.active { background: var(--accent-dim); border-color: rgba(255, 77, 0, 0.4); color: var(--accent); font-weight: 500; }

.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.review-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease;
}
.review-card:hover { border-color: rgba(255, 77, 0, 0.3); }
.review-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.review-product-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.rating-badge {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
}
.rating-badge.good { background: var(--good-dim); color: var(--good); }
.rating-badge.mid { background: rgba(255, 152, 0, 0.15); color: #ff9800; }
.rating-badge.poor { background: var(--poor-dim); color: var(--poor); }

.review-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.meta-item { font-size: 11px; color: var(--text-muted); }
.review-pros { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.review-pros:before { content: '+ '; color: var(--good); font-weight: 600; }
.review-cons { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.review-cons:before { content: '− '; color: var(--poor); font-weight: 600; }
.review-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.review-date { font-size: 11px; color: var(--text-muted); }
.review-add-link { font-size: 12px; color: var(--accent); text-decoration: none; font-weight: 500; }
.review-add-link:hover { text-decoration: underline; }
.review-bar { height: 3px; background: var(--bg-surface-2); border-radius: 2px; overflow: hidden; }
.review-bar .bar-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.6s ease; }

.reviews-empty { text-align: center; padding: 80px 24px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; }
.empty-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }
.empty-sub { font-size: 14px; color: var(--text-muted); }

/* ===== REVIEW FORM ===== */
.form-page { padding: 120px 24px 100px; }
.form-inner { max-width: 640px; margin: 0 auto; }
.review-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-family: var(--font-display); font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.8px; }
.form-input {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  width: 100%;
  transition: border-color 0.2s ease;
}
.form-input:focus { outline: none; border-color: var(--accent); }
.form-input.error { border-color: var(--poor); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2360606e' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.form-file { padding: 10px 14px; }
.form-error-msg { font-size: 12px; color: var(--poor); display: none; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; padding-top: 8px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .reviews-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
}
@media (max-width: 600px) {
  .reviews-page { padding: 100px 16px 60px; }
  .form-page { padding: 100px 16px 60px; }
  .review-grid { grid-template-columns: 1fr; }
  .reviews-toolbar { flex-direction: column; align-items: flex-start; gap: 12px; }
}