:root {
  --header-height: 80px;
  --header-bg: #3E8E41;
  --header-text: #ffffff;
  --nav-link-hover: rgba(255, 255, 255, 0.8);
  /* Color system */
  --green-600: #3E8E41;
  --primary-color: var(--green-600);
  --primary-light: #4CAF50;
  --primary-dark: #357a38;
  --secondary-color: #8c6e4a;
  --secondary-light: #b39268;
  --secondary-dark: #694f32;
  --accent-color: #e9b949;
  --success-color: #48bb78;
  --warning-color: #ed8936;
  --error-color: #e53e3e;
  --neutral-100: #f7fafc;
  --neutral-200: #edf2f7;
  --neutral-300: #e2e8f0;
  --neutral-400: #cbd5e0;
  --neutral-500: #a0aec0;
  --neutral-600: #718096;
  --neutral-700: #4a5568;
  --neutral-800: #2d3748;
  --neutral-900: #1a202c;
  
  /* Typography */
  --font-family: 'Poppins', sans-serif;
  --h1-size: 2.5rem;
  --h2-size: 2rem;
  --h3-size: 1.25rem;
  --body-size: 1rem;
  --small-size: 0.875rem;
  
  /* Spacing system */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 2.5rem;
  --space-6: 3rem;
  
  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--neutral-100);
  color: var(--neutral-800);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background-color: var(--header-bg);
  height: var(--header-height);
  width: 100%;
}

.header-content {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
}

.logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.desktop-nav {
  display: flex;
  gap: 2rem;
}

.desktop-nav a {
  color: var(--header-text);
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--nav-link-hover);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  margin: 0;
}

.menu-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: white;
  position: relative;
  transition: background-color var(--transition-normal);
  margin: 0;
}

.menu-icon.active {
  background-color: transparent;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: white;
  transition: transform var(--transition-normal);
  margin: 0;
}

.menu-icon::before {
  top: -6px;
}

.menu-icon::after {
  bottom: -6px;
}

.menu-icon.active::before {
  transform: rotate(45deg);
  top: 0;
}

.menu-icon.active::after {
  transform: rotate(-45deg);
  bottom: 0;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background-color: var(--green-600);
  padding: var(--space-2);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  margin: 0;
}

.mobile-nav.active {
  display: block;
}

.mobile-nav-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.mobile-nav nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
}

.mobile-nav a {
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  padding: var(--space-2);
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

@media (max-width: 768px) {
  .header-content {
    padding: 0 1rem;
  }
  
  .desktop-nav {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .mobile-nav.active {
    display: block;
  }
}

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 0;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.125rem;
  color: var(--gray-600);
}

/* Quiz container */
.quiz-container {
  margin: var(--space-4) auto;
  background-color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 900px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Progress bar */
.progress-container {
  margin-top: var(--space-2);
}

.progress-bar {
  height: 0.5rem;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--space-2);
}

.progress {
  height: 100%;
  background-color: var(--accent-color);
  width: 16.66%;
  transition: width var(--transition-normal);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
}

.step {
  font-size: var(--small-size);
  opacity: 0.7;
  position: relative;
  flex: 1;
  text-align: center;
  transition: all var(--transition-normal);
}

.step.active {
  opacity: 1;
  font-weight: 500;
}

.step::before {
  content: "";
  height: 8px;
  width: 8px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
}

/* Main content area */
main {
  padding: var(--space-4);
  flex: 1;
  min-height: 400px;
  position: relative;
}

/* Question styles */
.question {
  display: none;
  animation: fadeIn var(--transition-normal);
}

.question.active {
  display: block;
}

.question h2 {
  text-align: center;
  margin-bottom: var(--space-3);
  color: var(--primary-dark);
}

/* Options styling */
.options-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.options-container.toggle {
  flex-direction: row;
  justify-content: center;
}

.options-container.pills {
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto;
}

.options-container.checkboxes {
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto;
}

.option {
  background-color: var(--neutral-200);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 2px solid transparent;
}

.options-container.toggle .option {
  flex: 1;
  max-width: 280px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.options-container.pills .option {
  width: 100%;
  box-shadow: var(--shadow-sm);
}

.option:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  background-color: var(--neutral-300);
}

.option.selected {
  border-color: var(--primary-color);
  background-color: rgba(62, 142, 65, 0.1);
}

.option-icon {
  font-size: 2rem;
  margin-bottom: var(--space-1);
}

.option h3 {
  margin-bottom: var(--space-1);
  color: var(--primary-dark);
}

.option p {
  font-size: var(--small-size);
  color: var(--neutral-600);
  margin-bottom: 0;
}

/* Checkbox styling */
.option.checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
}

.check-box {
  width: 24px;
  height: 24px;
  border: 2px solid var(--neutral-400);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.option.selected .check-box {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
}

.check-mark {
  width: 12px;
  height: 8px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.option.selected .check-mark {
  opacity: 1;
}

.option-content {
  flex: 1;
}

/* Navigation */
.navigation {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3);
  border-top: 1px solid var(--neutral-300);
}

.nav-button {
  padding: var(--space-1) var(--space-3);
  background-color: var(--green-600);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition-normal);
}

.nav-button:hover {
  background-color: var(--primary-dark);
}

.nav-button.back {
  background-color: var(--neutral-400);
}

.nav-button.back:hover {
  background-color: var(--neutral-500);
}

.nav-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Results page styling */
.results-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.result-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background-color: white;
  transition: transform var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.result-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.result-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid var(--neutral-300);
}

.result-card-content {
  padding: var(--space-2);
  flex: 1;
}

.result-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.result-card-title {
  margin: 0;
  color: var(--primary-dark);
}

.match-score {
  background-color: var(--primary-color);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--small-size);
  font-weight: 500;
}

.specifications {
  margin-bottom: var(--space-2);
}

.specification {
  display: flex;
  margin-bottom: 4px;
}

.specification-label {
  font-weight: 500;
  width: 120px;
  flex-shrink: 0;
}

.match-reasons {
  margin-top: var(--space-2);
  background-color: var(--neutral-200);
  padding: var(--space-2);
  border-radius: var(--radius-md);
}

.match-reasons h4 {
  margin-bottom: var(--space-1);
  font-size: var(--small-size);
  color: var(--primary-dark);
}

.match-reasons ul {
  padding-left: var(--space-2);
  font-size: var(--small-size);
}

.match-reasons li {
  margin-bottom: 4px;
}

.kit-description {
  margin-top: var(--space-2);
  font-size: var(--small-size);
  color: var(--neutral-700);
}

/* Footer */
.footer {
  background-color: #2d3748;
  color: #ffffff;
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-info {
  max-width: 400px;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-info p {
  color: #a0aec0;
  line-height: 1.6;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.link-group h4 {
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.link-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-group ul li {
  margin-bottom: 0.75rem;
}

.link-group a {
  color: #a0aec0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.link-group a:hover {
  color: #ffffff;
}

.copyright {
  text-align: center;
  color: #a0aec0;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #4a5568;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-links {
    grid-template-columns: 1fr;
  }
  
  .footer {
    padding: 2rem 0 1rem;
  }
  
  .copyright {
    margin-top: 2rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive design */
@media (max-width: 768px) {
  :root {
    --h1-size: 2rem;
    --h2-size: 1.75rem;
    --h3-size: 1.2rem;
  }
  
  body {
    padding: var(--space-1);
  }
  
  .quiz-container {
    border-radius: var(--radius-md);
  }
  
  main {
    padding: var(--space-2);
  }
  
  .options-container.toggle {
    flex-direction: column;
  }
  
  .options-container.toggle .option {
    max-width: 100%;
  }
  
  .progress-steps {
    display: none;
  }
  
  .results-container {
    grid-template-columns: 1fr;
  }
  
  .desktop-nav {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .mobile-nav.active {
    display: block;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --h1-size: 1.75rem;
    --h2-size: 1.5rem;
    --h3-size: 1.1rem;
    --body-size: 0.9rem;
    --small-size: 0.8rem;
  }
  
  header {
    padding: var(--space-2);
  }
  
  .navigation {
    padding: var(--space-2);
  }
  
  .nav-button {
    padding: 8px 16px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}