/* Theme toggle button */
.theme-toggle {
  position: fixed; top: 16px; right: 16px; z-index: 1000;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--card);
  cursor: pointer; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  color: var(--text);
}
.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  border-color: var(--accent);
}

/* Light theme overrides */
[data-theme="light"] {
  --bg: #f8fafc;
  --bg2: #f1f5f9;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --card-active: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #cbd5e1;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.1);
  --accent-glow: rgba(59, 130, 246, 0.15);
  --teal: #0d9488;
  --teal-soft: rgba(13, 148, 136, 0.08);
  --green: #059669;
  --yellow: #d97706;
  --orange: #ea580c;
  --red: #dc2626;
  --pink: #db2777;
  --pink-soft: rgba(219, 39, 119, 0.08);
  --purple: #7c3aed;
  --purple-soft: rgba(124, 58, 237, 0.08);
  --text: #0f172a;
  --text-secondary: #475569;
  --text-dim: #64748b;
  --glass: rgba(255, 255, 255, 0.8);
}

/* Light mode background gradient */
[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 600px 400px at 15% 20%, rgba(59,130,246,0.08), transparent),
    radial-gradient(ellipse 500px 500px at 85% 60%, rgba(13,148,136,0.06), transparent),
    radial-gradient(ellipse 400px 300px at 50% 90%, rgba(219,39,119,0.04), transparent) !important;
}

/* Cards get subtle shadows in light mode */
[data-theme="light"] .disease-card,
[data-theme="light"] .score-card,
[data-theme="light"] .calc-panel,
[data-theme="light"] .result-panel,
[data-theme="light"] .about,
[data-theme="light"] .panel,
[data-theme="light"] .login-box,
[data-theme="light"] .modal,
[data-theme="light"] .value-card,
[data-theme="light"] .score-item,
[data-theme="light"] .upload-zone,
[data-theme="light"] .paywall {
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
}

[data-theme="light"] .disease-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.1), 0 0 0 1px var(--border-light);
}

/* Header gradient text needs to be darker in light mode */
[data-theme="light"] .header-logo h1 {
  background: linear-gradient(135deg, #0f172a, #475569);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* Binary items */
[data-theme="light"] .binary-item {
  background: var(--bg2);
}
[data-theme="light"] .binary-item:hover {
  background: #e2e8f0;
  border-color: var(--border);
}

/* Slider track */
[data-theme="light"] .range-row input[type=range] {
  background: #cbd5e1;
}

/* Compute button keeps gradient */
[data-theme="light"] .compute-btn {
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

/* Disclaimer */
[data-theme="light"] .disclaimer {
  background: rgba(217, 119, 6, 0.06);
  border-color: rgba(217, 119, 6, 0.2);
}

/* Result score shadows */
[data-theme="light"] .result-score.low { text-shadow: none; }
[data-theme="light"] .result-score.moderate { text-shadow: none; }
[data-theme="light"] .result-score.high { text-shadow: none; }

/* Form inputs in light mode */
[data-theme="light"] .pin-input,
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea,
[data-theme="light"] .form-group select,
[data-theme="light"] select {
  background: #f8fafc;
  border-color: #e2e8f0;
}

/* Toast */
[data-theme="light"] .toast {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Pay buttons keep their gradients - no change needed */

/* Chart grid lines */
[data-theme="light"] .score-table th,
[data-theme="light"] .score-table td {
  border-bottom-color: #e2e8f0;
}
