/* ============================================
   FakeInChina — Design System & Styles
   ============================================ */

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

/* ---------- CSS Variables (Dark Theme - Default) ---------- */
:root {
  /* Colors - Dark Theme */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-tertiary: #1a2035;
  --bg-card: rgba(26, 32, 53, 0.8);
  --bg-card-hover: rgba(35, 45, 70, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-border: rgba(255, 255, 255, 0.1);
  --bg-modal-overlay: rgba(0, 0, 0, 0.7);

  --text-primary: #f0f2f5;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0a0e1a;

  /* Brand Colors */
  --brand-primary: #3b82f6;
  --brand-primary-hover: #2563eb;
  --brand-secondary: #06b6d4;
  --brand-accent: #8b5cf6;
  --brand-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --brand-gradient-hover: linear-gradient(135deg, #2563eb, #7c3aed);

  /* Risk Level Colors */
  --risk-low: #22c55e;
  --risk-low-bg: rgba(34, 197, 94, 0.15);
  --risk-medium: #f59e0b;
  --risk-medium-bg: rgba(245, 158, 11, 0.15);
  --risk-high: #ef4444;
  --risk-high-bg: rgba(239, 68, 68, 0.15);
  --risk-critical: #dc2626;
  --risk-critical-bg: rgba(220, 38, 38, 0.2);

  /* Star Colors */
  --star-filled: #fbbf24;
  --star-empty: #374151;

  /* Surface */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.15);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.15);

  /* Spacing */
  --header-height: 72px;
  --section-padding: 80px 0;
  --container-max: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Particles */
  --particle-color: rgba(59, 130, 246, 0.3);
}

/* ---------- Light Theme ---------- */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --bg-glass: rgba(255, 255, 255, 0.7);
  --bg-glass-border: rgba(0, 0, 0, 0.08);
  --bg-modal-overlay: rgba(0, 0, 0, 0.5);

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

  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-hover: rgba(0, 0, 0, 0.15);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.1);

  --star-empty: #d1d5db;
  --particle-color: rgba(59, 130, 246, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-base), color var(--transition-base);
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--brand-primary-hover); }

img { max-width: 100%; height: auto; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
  background: var(--brand-primary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-primary-hover); }

/* ---------- Container ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Section ---------- */
.section {
  padding: var(--section-padding);
  position: relative;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* ============================================
   HEADER / NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bg-glass-border);
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: var(--bg-secondary);
  box-shadow: var(--shadow-md);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-primary);
}

.navbar-brand img {
  height: 40px;
  width: 40px;
  border-radius: var(--radius-sm);
}

.navbar-brand:hover { color: var(--text-primary); }

.navbar-nav {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-nav .nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-glass);
}

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--brand-primary);
  color: #fff;
  transform: rotate(30deg);
}

/* Mobile menu toggle */
.navbar-toggler {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--header-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  padding: 40px 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 50px;
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  color: var(--brand-primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
}

.hero-badge i { animation: pulse-glow 2s infinite; }

.hero h1 {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 .gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

/* Search Bar */
.hero-search {
  max-width: 600px;
  margin: 0 auto 2rem;
  position: relative;
}

.hero-search .search-wrapper {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 60px;
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.hero-search .search-wrapper:focus-within {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-glow);
}

.hero-search input {
  flex: 1;
  padding: 16px 24px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
}

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

.hero-search .btn-search {
  padding: 16px 28px;
  background: var(--brand-gradient);
  border: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-search .btn-search:hover {
  background: var(--brand-gradient-hover);
  transform: scale(1.02);
}

/* Hero CTA */
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 60px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: rgba(59, 130, 246, 0.05);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(239, 68, 68, 0.4);
  color: #fff;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}

/* ============================================
   STATS / TRUST INDICATORS
   ============================================ */
.stats-section {
  padding: 60px 0;
  position: relative;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  transition: all var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-glow);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.4rem;
  background: var(--brand-gradient);
  color: #fff;
}

.stat-card:nth-child(2) .stat-icon { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.stat-card:nth-child(3) .stat-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-card:nth-child(4) .stat-icon { background: linear-gradient(135deg, #ef4444, #dc2626); }

.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================
   PRODUCT GRID
   ============================================ */
.products-section {
  padding: 80px 0;
}

/* Filters Bar */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.filter-select,
.filter-input {
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  outline: none;
  appearance: auto;
}

.filter-select:focus,
.filter-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.filters-bar .spacer { flex: 1; }

.results-count {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* Product Card */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: var(--brand-gradient);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 0;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-glow);
}

.product-card:hover::before { opacity: 0.03; }

.product-card > * { position: relative; z-index: 1; }

.product-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.product-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--brand-primary);
  flex-shrink: 0;
}

.product-info { flex: 1; min-width: 0; }

.product-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-category {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.product-card-body { margin-bottom: 16px; }

.product-summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* Stars */
.stars {
  display: flex;
  gap: 2px;
  font-size: 0.9rem;
}

.stars .fa-star { color: var(--star-empty); }
.stars .fa-star.filled { color: var(--star-filled); }
.stars .fa-star-half-alt { color: var(--star-filled); }

.rating-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-left: 6px;
}

/* Risk Badge */
.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.risk-badge.low { background: var(--risk-low-bg); color: var(--risk-low); }
.risk-badge.medium { background: var(--risk-medium-bg); color: var(--risk-medium); }
.risk-badge.high { background: var(--risk-high-bg); color: var(--risk-high); }
.risk-badge.critical {
  background: var(--risk-critical-bg);
  color: var(--risk-critical);
  animation: pulse-risk 2s infinite;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* Reports count */
.reports-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */
.product-detail {
  padding-top: calc(var(--header-height) + 40px);
  min-height: 100vh;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 24px;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.back-button:hover { color: var(--brand-primary); }

.product-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 40px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(10px);
}

.product-detail-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--brand-primary);
  flex-shrink: 0;
}

.product-detail-info { flex: 1; }

.product-detail-name {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.product-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.product-detail-meta .product-category {
  font-size: 0.9rem;
}

.product-detail-url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--brand-primary);
  word-break: break-all;
}

.product-detail-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.detail-stat {
  text-align: center;
}

.detail-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.detail-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Risk Meter */
.risk-meter {
  margin-top: 20px;
  padding: 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.risk-meter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.risk-meter-bar {
  height: 10px;
  background: var(--bg-tertiary);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.risk-meter-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 1s ease;
}

.risk-meter-fill.low { width: 25%; background: var(--risk-low); }
.risk-meter-fill.medium { width: 50%; background: var(--risk-medium); }
.risk-meter-fill.high { width: 75%; background: var(--risk-high); }
.risk-meter-fill.critical { width: 100%; background: linear-gradient(90deg, var(--risk-high), var(--risk-critical)); }

/* Reviews List */
.reviews-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.review-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  transition: all var(--transition-base);
}

.review-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-sm);
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.reviewer-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reviewer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.reviewer-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.reviewer-country {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.review-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.review-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.review-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-modal-overlay);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(30px) scale(0.95);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  transition: color var(--transition-fast);
  padding: 4px;
}

.modal-close:hover { color: var(--text-primary); }

.modal-body {
  padding: 28px;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-control::placeholder { color: var(--text-muted); }

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control { appearance: auto; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-error {
  font-size: 0.8rem;
  color: var(--risk-high);
  margin-top: 4px;
  display: none;
}

.form-group.has-error .form-control {
  border-color: var(--risk-high);
}

.form-group.has-error .form-error {
  display: block;
}

/* Star Rating Input */
.star-rating-input {
  display: flex;
  gap: 4px;
  font-size: 1.5rem;
  cursor: pointer;
}

.star-rating-input .fa-star {
  color: var(--star-empty);
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.star-rating-input .fa-star:hover { transform: scale(1.2); }
.star-rating-input .fa-star.active { color: var(--star-filled); }

.modal-footer {
  padding: 0 28px 28px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.how-it-works {
  background: var(--bg-secondary);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.step-card {
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  position: relative;
  transition: all var(--transition-base);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: var(--brand-primary);
}

.step-number {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  background: var(--brand-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
}

.step-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.disclaimer-box {
  padding: 24px;
  background: var(--risk-medium-bg);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  text-align: left;
}

.disclaimer-box h4 {
  color: var(--risk-medium);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.disclaimer-box p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

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

.footer-links {
  display: flex;
  gap: 16px;
}

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

.footer-links a:hover { color: var(--brand-primary); }



/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.empty-state p {
  font-size: 0.9rem;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 16px);
  right: 16px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  transform: translateX(120%);
  transition: transform var(--transition-base);
}

.toast.show { transform: translateX(0); }

.toast.success { border-left: 4px solid var(--risk-low); }
.toast.error { border-left: 4px solid var(--risk-high); }
.toast.info { border-left: 4px solid var(--brand-primary); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pulse-risk {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.3); }
  50% { box-shadow: 0 0 12px 4px rgba(220, 38, 38, 0.15); }
}

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

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes countUp {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animations */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* ============================================
   PAGE VIEWS (hash routing)
   ============================================ */
.page-view {
  display: none;
}

.page-view.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
  .hero h1 { font-size: 2.5rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; max-width: 500px; margin-left: auto; margin-right: auto; }
  .product-detail-header { flex-direction: column; }

  .navbar-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column !important;
    padding: 16px;
    gap: 4px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
  }

  .navbar-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .navbar-nav .nav-link {
    padding: 12px 16px;
    width: 100%;
    text-align: left;
  }

  .navbar-toggler { display: block; }
}

@media (max-width: 767px) {
  .hero h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .section-title { font-size: 1.6rem; }
  .product-grid { grid-template-columns: 1fr; }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .filter-group { flex-direction: column; align-items: stretch; }
  .form-row { grid-template-columns: 1fr; }
  .product-detail-stats { gap: 20px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 20px 12px; }
  .stat-number { font-size: 1.8rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .data-bar .container { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.7rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .modal { border-radius: var(--radius-lg); }
  .modal-body { padding: 20px; }
}
