/* ============================================
   MODERN THEME - Clean & Minimal
   ============================================ */

:root {
  /* Base Colors */
  --color-bg: #fafafa;
  --color-card-bg: #ffffff;
  --color-text: #1f2937;
  --color-text-secondary: #6b7280;
  --color-border: #e5e7eb;

  /* Primary/Accent */
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;

  /* Category Colors - Unadapted (Red) */
  --color-unadapted: #fef2f2;
  --color-unadapted-text: #b91c1c;
  --color-unadapted-border: #fecaca;

  /* Category Colors - Recommended (Green) */
  --color-recommended: #f0fdf4;
  --color-recommended-text: #15803d;
  --color-recommended-border: #bbf7d0;

  /* Category Colors - Neutral (Gray/Blue) */
  --color-neutral: #f8fafc;
  --color-neutral-text: #475569;
  --color-neutral-border: #e2e8f0;

  /* Typography */
  --font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font-size-base: 16px;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
}

/* Override base styles with theme-specific refinements */

/* Pan Card refinements */
.pan-card {
  border: 1px solid var(--color-border);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pan-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.pan-card-name {
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* Ingredient Card refinements */
.ingredient-card.unadapted {
  border: 1px solid var(--color-unadapted-border);
}

.ingredient-card.recommended {
  border: 1px solid var(--color-recommended-border);
}

.ingredient-card.neutral {
  border: 1px solid var(--color-neutral-border);
}

.ingredient-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Button refinements */
.back-button {
  font-weight: 500;
  letter-spacing: -0.01em;
}

.retry-button {
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Modal refinements */
.modal {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
  background: linear-gradient(to right, var(--color-bg), var(--color-card-bg));
}

.modal-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

/* Section title refinements */
.ingredient-section-title {
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* Site header refinements */
.site-header {
  background: linear-gradient(to bottom, var(--color-card-bg), var(--color-bg));
}

.site-title {
  letter-spacing: -0.02em;
  background: linear-gradient(
    135deg,
    var(--color-text) 0%,
    var(--color-text-secondary) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   DARK MODE - System Preference
   ============================================ */

@media (prefers-color-scheme: dark) {
  :root {
    /* Base Colors - Dark */
    --color-bg: #0f172a;
    --color-card-bg: #1e293b;
    --color-text: #f1f5f9;
    --color-text-secondary: #94a3b8;
    --color-border: #334155;

    /* Primary/Accent - Dark */
    --color-primary: #60a5fa;
    --color-primary-hover: #3b82f6;

    /* Category Colors - Unadapted (Red) - Dark */
    --color-unadapted: #450a0a;
    --color-unadapted-text: #fca5a5;
    --color-unadapted-border: #7f1d1d;

    /* Category Colors - Recommended (Green) - Dark */
    --color-recommended: #052e16;
    --color-recommended-text: #86efac;
    --color-recommended-border: #166534;

    /* Category Colors - Neutral (Gray/Blue) - Dark */
    --color-neutral: #1e293b;
    --color-neutral-text: #cbd5e1;
    --color-neutral-border: #475569;

    /* Effects - Dark */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md:
      0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg:
      0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  }

  /* Modal overlay darker in dark mode */
  .modal-overlay {
    background: rgba(0, 0, 0, 0.7);
  }
}
