:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --bg-light: #f8fafc;
  --bg-dark: #0f172a;
  --text-light: #1e293b;
  --text-dark: #f1f5f9;
  --card-light: #ffffff;
  --card-dark: #1e293b;
  --border-light: #e2e8f0;
  --border-dark: #334155;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-light);
  color: var(--text-light);
  transition: background 0.3s ease, color 0.3s ease;
  line-height: 1.5;
}

body.dark {
  background: var(--bg-dark);
  color: var(--text-dark);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================ */
/* NAVIGATION - ABOVE HEADER
/* ============================================ */
.nav {
  background: var(--card-light);
  border-bottom: 1px solid var(--border-light);
  padding: 0;
  position: relative;
  z-index: 101;
}

body.dark .nav {
  background: var(--card-dark);
  border-bottom-color: var(--border-dark);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  font-size: 15px;
  padding: 8px 18px;
  border-radius: 40px;
  transition: all 0.2s ease;
}

body.dark .nav-links a {
  color: var(--text-dark);
}

.nav-links a:hover {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.08);
}

.nav-links a.active {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.12);
  font-weight: 600;
}

/* ============================================ */
/* HEADER - BELOW NAVIGATION
/* ============================================ */
.header {
  background: var(--card-light);
  border-bottom: 1px solid var(--border-light);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease;
}

body.dark .header {
  background: var(--card-dark);
  border-bottom-color: var(--border-dark);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-img {
  height: 56px;
  width: auto;
  transition: transform 0.2s ease;
}

.logo-img:hover {
  transform: scale(1.02);
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--border-light);
  border: none;
  border-radius: 40px;
  padding: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

body.dark .theme-toggle {
  background: var(--border-dark);
}

.theme-toggle:hover {
  background: #cbd5e1;
}

body.dark .theme-toggle:hover {
  background: #475569;
}

.theme-icon {
  width: 22px;
  height: 22px;
  stroke: var(--text-light);
  transition: stroke 0.3s ease;
  fill: none;
}

body.dark .theme-icon {
  stroke: var(--text-dark);
}

/* ============================================ */
/* PROFESSIONAL HERO SECTION WITH ILLUSTRATION
/* ============================================ */
.hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  color: white;
  padding: 60px 24px;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.05"><path fill="white" d="M20,20 L80,20 M20,40 L80,40 M20,60 L80,60 M20,80 L80,80 M40,20 L40,80 M60,20 L60,80 M80,20 L80,80"/></svg>');
  background-repeat: repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
  min-width: 280px;
}

.hero-visual {
  flex: 1;
  min-width: 280px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual svg {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.3;
}

.hero-highlight {
  color: #fbbf24;
  display: inline-block;
}

.hero p {
  font-size: 20px;
  opacity: 0.9;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn-primary-large {
  background: #fbbf24;
  color: #0f172a;
  padding: 14px 32px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-block;
}

.btn-primary-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  background: #f59e0b;
}

.btn-outline-large {
  background: transparent;
  border: 2px solid white;
  color: white;
  padding: 14px 32px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
  display: inline-block;
}

.btn-outline-large:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  justify-content: flex-start;
  gap: 48px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 32px;
  font-weight: 800;
}

.stat-label {
  font-size: 14px;
  opacity: 0.8;
}

/* Section Header */
.section-header {
  text-align: center;
  margin: 64px 0 32px;
}

.section-header-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--primary);
}

.section-header-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
}

.section-header h2 {
  font-size: 32px;
  margin-bottom: 12px;
  color: var(--text-light);
}

body.dark .section-header h2 {
  color: var(--text-dark);
}

.section-header p {
  color: #666;
  font-size: 18px;
}

body.dark .section-header p {
  color: #94a3b8;
}

/* Tool Cards */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 48px 0;
}

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

.tool-card {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 28px 24px 60px 24px;
  text-align: left;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  display: block;
  position: relative;
}

body.dark .tool-card {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 30px -12px rgba(0,0,0,0.15);
}

.tool-icon-svg {
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  color: var(--primary);
}

.tool-icon-svg svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.tool-card h3 {
  font-size: 22px;
  color: var(--text-light);
  margin-bottom: 12px;
}

body.dark .tool-card h3 {
  color: var(--text-dark);
}

.tool-card p {
  color: #666;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 16px;
}

body.dark .tool-card p {
  color: #94a3b8;
}

.tool-link {
  position: absolute;
  bottom: 24px;
  left: 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  transition: transform 0.2s;
  display: inline-block;
}

.tool-card:hover .tool-link {
  transform: translateX(4px);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.product-card {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

body.dark .product-card {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin-bottom: 16px;
}

.product-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.product-price {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary);
  margin: 12px 0;
}

.product-specs {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

body.dark .product-specs {
  color: #94a3b8;
}

/* View Details Button */
.btn-view-details {
  margin-top: 12px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: 8px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-view-details:hover {
  background: var(--primary);
  color: white;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* Trust Section */
.trust-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 64px 0 48px;
}

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

.trust-card {
  text-align: center;
  padding: 32px 24px;
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  transition: transform 0.3s;
}

body.dark .trust-card {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.trust-card:hover {
  transform: translateY(-4px);
}

.trust-icon-svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  margin-left: auto;
  margin-right: auto;
  color: var(--primary);
}

.trust-icon-svg svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
}

.trust-card h3 {
  margin-bottom: 12px;
}

.trust-card p {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
}

body.dark .trust-card p {
  color: #94a3b8;
}

/* Why Trust Us Section */
.why-trust-us {
  background: linear-gradient(135deg, rgba(59,130,246,0.05) 0%, rgba(59,130,246,0.02) 100%);
  border-radius: 24px;
  padding: 48px 32px;
  text-align: center;
  margin: 48px 0;
  border: 1px solid var(--border-light);
}

body.dark .why-trust-us {
  background: linear-gradient(135deg, rgba(59,130,246,0.08) 0%, rgba(59,130,246,0.03) 100%);
  border-color: var(--border-dark);
}

.why-trust-us-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  color: var(--primary);
}

.why-trust-us-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.why-trust-us h3 {
  font-size: 28px;
  margin-bottom: 16px;
  color: var(--text-light);
}

body.dark .why-trust-us h3 {
  color: var(--text-dark);
}

.why-trust-us p {
  max-width: 800px;
  margin: 0 auto 24px;
  line-height: 1.6;
  color: #555;
}

body.dark .why-trust-us p {
  color: #94a3b8;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}

.trust-badge {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 40px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
}

body.dark .trust-badge {
  background: var(--card-dark);
  border-color: var(--border-dark);
  color: var(--text-dark);
}

/* Last Updated Timestamp */
.last-updated {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #666;
  padding: 8px 16px;
  background: var(--bg-light);
  border-radius: 40px;
  width: fit-content;
  margin-left: auto;
  border: 1px solid var(--border-light);
}

body.dark .last-updated {
  background: var(--bg-dark);
  border-color: var(--border-dark);
  color: #94a3b8;
}

.last-updated svg {
  stroke: var(--primary);
}

/* Quiz Page */
.quiz-option {
  width: 100%;
  text-align: left;
  padding: 14px 20px;
  background: var(--bg-light);
  border: 2px solid var(--border-light);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
}

body.dark .quiz-option {
  background: var(--bg-dark);
  border-color: var(--border-dark);
  color: var(--text-dark);
}

.quiz-option:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.quiz-option.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.device-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 18px;
}

.quiz-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-size: 16px;
  color: var(--text-light);
}

body.dark .quiz-input {
  background: var(--bg-dark);
  border-color: var(--border-dark);
  color: var(--text-dark);
}

.quiz-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Database Page */
.database-filters {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

body.dark .database-filters {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
}

body.dark .filter-group label {
  color: var(--text-dark);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-row span {
  font-size: 14px;
  font-weight: 600;
  min-width: 45px;
  color: var(--text-light);
}

body.dark .filter-row span {
  color: var(--text-dark);
}

.filter-group input[type="range"] {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  background: var(--border-light);
  border-radius: 2px;
  outline: none;
}

body.dark .filter-group input[type="range"] {
  background: var(--border-dark);
}

.filter-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
}

.filter-group select {
  padding: 10px 12px;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
}

body.dark .filter-group select {
  background: var(--bg-dark);
  border-color: var(--border-dark);
  color: var(--text-dark);
}

.database-results-count {
  text-align: right;
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

body.dark .database-results-count {
  color: #94a3b8;
}

.database-results-count span {
  font-weight: 700;
  color: var(--primary);
}

/* Category Selector */
.category-selector {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

body.dark .category-selector {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.category-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.category-selector label {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-light);
}

body.dark .category-selector label {
  color: var(--text-dark);
}

.category-selector select {
  padding: 10px 16px;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-size: 15px;
  color: var(--text-light);
  cursor: pointer;
  min-width: 180px;
}

body.dark .category-selector select {
  background: var(--bg-dark);
  border-color: var(--border-dark);
  color: var(--text-dark);
}

.category-selector select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Compare Page */
.compare-selectors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 32px 0 24px;
}

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

.compare-selector-card {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

body.dark .compare-selector-card {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.compare-selector-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.selector-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-light);
}

body.dark .selector-label {
  color: var(--text-dark);
}

.compare-select {
  width: 100%;
  padding: 12px;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
}

body.dark .compare-select {
  background: var(--bg-dark);
  border-color: var(--border-dark);
  color: var(--text-dark);
}

.compare-select:focus {
  outline: none;
  border-color: var(--primary);
}

.compare-action {
  text-align: center;
  margin: 24px 0 48px;
}

.comparison-container {
  margin: 48px 0 32px;
  animation: fadeIn 0.3s ease;
}

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

.comparison-scroll {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-light);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

body.dark .comparison-table {
  background: var(--card-dark);
}

.comparison-table th,
.comparison-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

body.dark .comparison-table th,
body.dark .comparison-table td {
  border-bottom-color: var(--border-dark);
  color: var(--text-dark);
}

.comparison-table th {
  background: var(--primary);
  color: white;
  font-weight: 600;
  font-size: 16px;
}

.comparison-table .feature-col {
  background: var(--bg-light);
  font-weight: 600;
  width: 180px;
  color: #1e293b;
}

body.dark .comparison-table .feature-col {
  background: var(--bg-dark);
  color: #f1f5f9;
}

.comparison-table .product-col {
  background: var(--card-light);
  text-align: center;
  vertical-align: top;
}

body.dark .comparison-table .product-col {
  background: var(--card-dark);
  color: var(--text-dark);
}

.compare-img {
  max-width: 100px;
  max-height: 80px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  margin: 0 auto 12px auto;
}

.product-name-header {
  font-weight: 700;
  font-size: 16px;
  color: #1e293b;
  display: block;
  text-align: center;
}

body.dark .product-name-header {
  color: #f1f5f9;
}

.compare-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.btn-compare {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-compare:hover {
  background: var(--primary-dark);
}

.compare-footer {
  text-align: center;
  margin-top: 24px;
}

/* Calculator Page */
.calculator-card {
  max-width: 800px;
  margin: 0 auto 48px;
}

.calculator-form {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 32px;
}

body.dark .calculator-form {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

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

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.form-group-calculator {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group-calculator label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-light);
}

body.dark .form-group-calculator label {
  color: var(--text-dark);
}

.budget-input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-light);
  overflow: hidden;
}

body.dark .budget-input-wrapper {
  background: var(--bg-dark);
  border-color: var(--border-dark);
}

.budget-input-wrapper .currency {
  padding: 12px 16px;
  background: var(--border-light);
  font-weight: 600;
  color: var(--text-light);
}

body.dark .budget-input-wrapper .currency {
  background: var(--border-dark);
  color: var(--text-dark);
}

.budget-input-wrapper input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  font-size: 16px;
  background: var(--bg-light);
  color: var(--text-light);
  outline: none;
}

body.dark .budget-input-wrapper input {
  background: var(--bg-dark);
  color: var(--text-dark);
}

.budget-slider-wrapper {
  margin-top: 8px;
}

.budget-slider-wrapper input[type="range"] {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  background: var(--border-light);
  border-radius: 2px;
  outline: none;
}

body.dark .budget-slider-wrapper input[type="range"] {
  background: var(--border-dark);
}

.budget-slider-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
}

.budget-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: #666;
}

body.dark .budget-labels span {
  color: #94a3b8;
}

.calculator-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-size: 16px;
  color: var(--text-light);
  cursor: pointer;
}

body.dark .calculator-select {
  background: var(--bg-dark);
  border-color: var(--border-dark);
  color: var(--text-dark);
}

.calculator-select:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-calculate {
  width: 100%;
  background: var(--primary);
  color: white;
  padding: 14px 32px;
  border: none;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-calculate:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.calculator-results {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 32px;
  animation: fadeIn 0.3s ease;
}

body.dark .calculator-results {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.results-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

body.dark .results-header {
  border-bottom-color: var(--border-dark);
}

.results-header h3 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--text-light);
}

body.dark .results-header h3 {
  color: var(--text-dark);
}

.results-header p {
  color: #666;
}

body.dark .results-header p {
  color: #94a3b8;
}

.no-results {
  text-align: center;
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 48px 32px;
}

body.dark .no-results {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.no-results-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.no-results h3 {
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--text-light);
}

body.dark .no-results h3 {
  color: var(--text-dark);
}

.no-results p {
  color: #666;
  margin-bottom: 24px;
}

body.dark .no-results p {
  color: #94a3b8;
}

/* Price Tracker Page */
.tracker-card {
  max-width: 800px;
  margin: 0 auto 48px;
}

.tracker-form {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 40px;
  margin-bottom: 32px;
  text-align: center;
}

body.dark .tracker-form {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.tracker-icon-large {
  font-size: 64px;
  margin-bottom: 16px;
}

.tracker-form h2 {
  font-size: 28px;
  margin-bottom: 12px;
  color: var(--text-light);
}

body.dark .tracker-form h2 {
  color: var(--text-dark);
}

.tracker-form > p {
  color: #666;
  margin-bottom: 32px;
  font-size: 16px;
}

body.dark .tracker-form > p {
  color: #94a3b8;
}

.tracker-form-group {
  margin-bottom: 24px;
  text-align: left;
}

.tracker-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-light);
}

body.dark .tracker-form-group label {
  color: var(--text-dark);
}

.tracker-select,
.tracker-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-size: 16px;
  color: var(--text-light);
  cursor: pointer;
}

body.dark .tracker-select,
body.dark .tracker-input {
  background: var(--bg-dark);
  border-color: var(--border-dark);
  color: var(--text-dark);
}

.tracker-select:focus,
.tracker-input:focus {
  outline: none;
  border-color: var(--primary);
}

.price-input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-light);
  overflow: hidden;
}

body.dark .price-input-wrapper {
  background: var(--bg-dark);
  border-color: var(--border-dark);
}

.price-input-wrapper .currency {
  padding: 14px 16px;
  background: var(--border-light);
  font-weight: 600;
  color: var(--text-light);
}

body.dark .price-input-wrapper .currency {
  background: var(--border-dark);
  color: var(--text-dark);
}

.tracker-input-price {
  flex: 1;
  padding: 14px 16px;
  border: none;
  font-size: 16px;
  background: var(--bg-light);
  color: var(--text-light);
  outline: none;
}

body.dark .tracker-input-price {
  background: var(--bg-dark);
  color: var(--text-dark);
}

.btn-tracker {
  width: 100%;
  background: var(--primary);
  color: white;
  padding: 14px 32px;
  border: none;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-top: 8px;
}

.btn-tracker:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.tracker-message {
  margin-top: 24px;
  padding: 16px;
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

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

.tracker-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

.tracker-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 20px;
}

body.dark .tracker-feature {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.feature-check {
  font-size: 24px;
  color: #10b981;
  font-weight: 700;
}

.tracker-feature h4 {
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--text-light);
}

body.dark .tracker-feature h4 {
  color: var(--text-dark);
}

.tracker-feature p {
  font-size: 13px;
  color: #666;
}

body.dark .tracker-feature p {
  color: #94a3b8;
}

/* Footer */
.footer {
  background: var(--card-light);
  border-top: 1px solid var(--border-light);
  padding: 48px 0 24px;
  margin-top: 64px;
}

body.dark .footer {
  background: var(--card-dark);
  border-top-color: var(--border-dark);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-section h4 {
  margin-bottom: 16px;
}

.footer-section a {
  display: block;
  color: #666;
  text-decoration: none;
  margin-bottom: 8px;
}

body.dark .footer-section a {
  color: #94a3b8;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  margin-top: 32px;
  border-top: 1px solid var(--border-light);
  color: #666;
}

body.dark .footer-bottom {
  border-top-color: var(--border-dark);
  color: #94a3b8;
}

/* Page Header */
.page-header {
  text-align: center;
  padding: 48px 24px 24px;
  margin-bottom: 24px;
}

.page-header-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  color: var(--primary);
}

.page-header-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.page-header h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #2563eb;
}

body.dark .page-header h1 {
  color: var(--primary);
}

.page-subtitle {
  font-size: 18px;
  color: #666;
}

body.dark .page-subtitle {
  color: #94a3b8;
}

/* Cards */
.card {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}

body.dark .card {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.card h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--text-light);
}

body.dark .card h2 {
  color: var(--text-dark);
}

.card h3 {
  font-size: 18px;
  margin: 16px 0 8px;
  color: var(--primary);
}

.card p {
  line-height: 1.6;
  margin-bottom: 12px;
  color: var(--text-light);
}

body.dark .card p {
  color: var(--text-dark);
}

.card ul {
  margin: 16px 0 0 24px;
  line-height: 1.8;
}

.card li {
  margin-bottom: 8px;
}

/* SVG Icon Styles */
.card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  color: var(--primary);
}

.card-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.contact-icon-svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
  flex-shrink: 0;
}

.contact-icon-svg svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.feature-icon-svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--primary);
}

.feature-icon-svg svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.highlight-card {
  background: linear-gradient(135deg, rgba(59,130,246,0.1) 0%, rgba(59,130,246,0.05) 100%);
  border-left: 4px solid var(--primary);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.feature-item {
  text-align: center;
  padding: 20px;
  background: var(--bg-light);
  border-radius: 16px;
  border: 1px solid var(--border-light);
}

body.dark .feature-item {
  background: var(--bg-dark);
  border-color: var(--border-dark);
}

.feature-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
}

.feature-item h3 {
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 14px;
  line-height: 1.5;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

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

.response-time {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-light);
}

body.dark .form-group label {
  color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-light);
  color: var(--text-light);
  font-family: inherit;
  transition: border-color 0.2s;
}

body.dark .form-group input,
body.dark .form-group select,
body.dark .form-group textarea {
  background: var(--bg-dark);
  color: var(--text-dark);
  border-color: var(--border-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.form-message {
  margin-top: 16px;
}

.faq-section {
  margin-top: 32px;
}

.faq-item {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  margin-bottom: 8px;
  color: var(--text-light);
}

body.dark .faq-item h3 {
  color: var(--text-dark);
}

.faq-item p {
  color: #666;
}

body.dark .faq-item p {
  color: #94a3b8;
}

/* Dark mode support for SVG icons */
body.dark .card-icon,
body.dark .contact-icon-svg,
body.dark .feature-icon-svg,
body.dark .page-header-icon,
body.dark .section-header-icon,
body.dark .tool-icon-svg,
body.dark .trust-icon-svg,
body.dark .category-icon {
  color: var(--primary);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--card-light);
  border-radius: 24px;
  max-width: 750px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: modalFadeIn 0.3s ease;
}

body.dark .modal-content {
  background: var(--card-dark);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
  z-index: 1;
}

body.dark .modal-close {
  color: #94a3b8;
}

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

.modal-header {
  text-align: center;
  padding: 24px 24px 0;
  border-bottom: 1px solid var(--border-light);
}

body.dark .modal-header {
  border-bottom-color: var(--border-dark);
}

.modal-header img {
  max-width: 180px;
  max-height: 150px;
  object-fit: contain;
  margin-bottom: 16px;
}

.modal-header h2 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--text-light);
}

body.dark .modal-header h2 {
  color: var(--text-dark);
}

.modal-header .modal-price {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary);
  margin: 12px 0;
}

.modal-specs {
  padding: 24px;
}

.specs-section {
  margin-bottom: 24px;
}

.specs-section h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border-light);
}

body.dark .specs-section h4 {
  border-bottom-color: var(--border-dark);
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 0;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

body.dark .spec-item {
  border-bottom-color: var(--border-dark);
}

.spec-label {
  font-weight: 600;
  color: var(--text-light);
}

body.dark .spec-label {
  color: var(--text-dark);
}

.spec-value {
  color: #666;
  text-align: right;
}

body.dark .spec-value {
  color: #94a3b8;
}

.modal-footer {
  padding: 16px 24px 24px;
  text-align: center;
  border-top: 1px solid var(--border-light);
}

body.dark .modal-footer {
  border-top-color: var(--border-dark);
}

.modal-footer .btn {
  display: inline-block;
  padding: 12px 28px;
}

/* DARK MODE TEXT FIXES - Ensure all text is visible */
body.dark .result-spec-item,
body.dark .result-spec-item strong,
body.dark .result-spec-item span {
  color: #f1f5f9 !important;
}

body.dark .exact-badge,
body.dark .near-badge {
  color: white !important;
}

body.dark .view-details-btn {
  color: var(--primary) !important;
}

body.dark .view-details-btn:hover {
  color: white !important;
}

body.dark .check-price-btn {
  color: white !important;
}

body.dark ::-webkit-input-placeholder {
  color: #94a3b8 !important;
}

body.dark :-ms-input-placeholder {
  color: #94a3b8 !important;
}

body.dark ::placeholder {
  color: #94a3b8 !important;
}

/* ============================================ */
/* PHONE COMPARE PAGE - EQUAL HEIGHT CARDS      */
/* ============================================ */

.comparison-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
  align-items: stretch;
}

.phone-compare-card {
  flex: 1 1 calc(25% - 18px);
  min-width: 240px;
  max-width: calc(25% - 18px);
  background: var(--bg-light);
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: auto;
}

body.dark .phone-compare-card {
  background: var(--bg-dark);
}

.phone-compare-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* Make all content sections flexible */
.card-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 20px;
  text-align: center;
  color: white;
  flex-shrink: 0;
}

.card-header h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: white;
  line-height: 1.3;
  min-height: 52px;
}

.price-badge {
  font-size: 1.2rem;
  font-weight: 700;
}

.phone-image-sm {
  width: 100%;
  height: 140px;
  object-fit: contain;
  padding: 12px;
  background: white;
  flex-shrink: 0;
}

body.dark .phone-image-sm {
  background: #1a1a2e;
}

.specs-list {
  padding: 16px;
  flex-shrink: 0;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  gap: 8px;
}

body.dark .spec-item {
  border-bottom-color: var(--border-dark);
}

.spec-label {
  font-weight: 600;
  color: var(--text-light);
  flex-shrink: 0;
}

.spec-value {
  text-align: right;
  word-break: break-word;
  color: var(--text-light);
}

body.dark .spec-value {
  color: var(--text-dark);
}

.ai-section {
  padding: 0 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pros-box, .cons-box {
  margin: 8px 0;
  padding: 12px;
  border-radius: 12px;
  flex-shrink: 0;
}

.pros-box {
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid #10b981;
}

.cons-box {
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid #ef4444;
}

.pros-box h4, .cons-box h4 {
  font-size: 0.8rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pros-box h4 { color: #10b981; }
.cons-box h4 { color: #ef4444; }

.pros-list, .cons-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pros-list li, .cons-list li {
  padding: 4px 0;
  font-size: 12px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}

.pros-list li::before {
  content: "✓";
  color: #10b981;
  font-weight: bold;
  flex-shrink: 0;
}

.cons-list li::before {
  content: "✗";
  color: #ef4444;
  font-weight: bold;
  flex-shrink: 0;
}

.rating-box {
  background: linear-gradient(135deg, rgba(59,130,246,0.1) 0%, rgba(37,99,235,0.05) 100%);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
  margin-top: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rating-number {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.rating-text {
  font-size: 11px;
  color: #666;
  line-height: 1.3;
}

body.dark .rating-text {
  color: #94a3b8;
}

.card-footer {
  padding: 12px 16px 16px;
  text-align: center;
  flex-shrink: 0;
}

.check-price-btn-sm {
  display: inline-block;
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
}

.check-price-btn-sm:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Tablet: 2 cards per row */
@media (max-width: 1024px) {
  .phone-compare-card {
    flex: 1 1 calc(50% - 12px);
    min-width: calc(50% - 12px);
    max-width: calc(50% - 12px);
  }
  .card-header h3 {
    font-size: 1rem;
    min-height: 44px;
  }
}

/* Mobile: 1 card per row */
@media (max-width: 768px) {
  .phone-compare-card {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: 100%;
  }
  .card-header h3 {
    font-size: 1.1rem;
    min-height: auto;
  }
  .rating-number {
    font-size: 1rem;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 48px;
  }
}

@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  
  .hero h1 {
    font-size: 36px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .hero-visual svg {
    max-width: 280px;
  }
  
  .hero-stats {
    gap: 24px;
  }
  
  .stat-number {
    font-size: 24px;
  }
  
  .section-header h2 {
    font-size: 28px;
  }
  
  .page-header h1 {
    font-size: 32px;
  }
  
  .card {
    padding: 24px;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    gap: 8px;
    padding: 12px 16px;
  }
  
  .nav-links a {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .logo-img {
    height: 44px;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  .trust-section {
    grid-template-columns: 1fr;
  }
  
  .database-filters {
    grid-template-columns: 1fr;
  }
  
  .category-selector {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .compare-selectors {
    grid-template-columns: 1fr;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 10px;
    font-size: 13px;
  }
  
  .compare-img {
    max-width: 80px;
  }
  
  .calculator-card {
    margin: 0 auto 32px;
  }
  
  .calculator-form {
    padding: 24px;
  }
  
  .results-header h3 {
    font-size: 20px;
  }
  
  .tracker-form {
    padding: 24px;
  }
  
  .tracker-form h2 {
    font-size: 24px;
  }
  
  .tracker-features {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .why-trust-us {
    padding: 32px 20px;
  }
  
  .why-trust-us h3 {
    font-size: 24px;
  }
  
  .trust-badges {
    gap: 12px;
  }
  
  .trust-badge {
    font-size: 12px;
    padding: 6px 14px;
  }
  
  .last-updated {
    font-size: 11px;
    margin-right: 0;
    width: 100%;
    justify-content: center;
  }
  
  .specs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }
  .nowrap {
    white-space: normal;
  }
  .category-selector {
    flex-direction: column;
    align-items: flex-start;
  }
}