:root {
  color-scheme: dark;
  --ink: #0d1117;
  --slate: #111827;
  --slate-2: #0f172a;
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(196, 181, 253, 0.38);
  --text: #f8fafc;
  --muted: #94a3b8;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --emerald: #34d399;
  --rose: #fb7185;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(139, 92, 246, 0.28), transparent 34rem),
    radial-gradient(circle at 86% 10%, rgba(251, 113, 133, 0.2), transparent 32rem),
    linear-gradient(135deg, var(--ink) 0%, #101827 44%, var(--slate) 100%);
}

input,
button,
a {
  -webkit-tap-highlight-color: transparent;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.75;
}

.glass {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.88), rgba(15, 23, 42, 0.76));
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.soft-border {
  border: 1px solid var(--line);
}

.tab-active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(251, 113, 133, 0.16));
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.12);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}

.faq-item.open .faq-answer {
  max-height: 24rem;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.heat-day {
  min-height: 2.15rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.heat-day:hover {
  transform: translateY(-1px);
}

.heat-day--base {
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

.heat-day--fertile {
  background: rgba(34, 211, 238, 0.22);
  color: #cffafe;
  border: 1px solid rgba(34, 211, 238, 0.24);
}

.heat-day--peak {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.94), rgba(34, 211, 238, 0.74));
  color: #04111d;
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.35);
}

.heat-day--ovulation {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.95), rgba(52, 211, 153, 0.86));
  color: #fff;
  box-shadow: 0 0 22px rgba(139, 92, 246, 0.35);
}

.heat-day--period {
  background: rgba(251, 113, 133, 0.24);
  color: #ffe4e6;
  border: 1px solid rgba(251, 113, 133, 0.28);
}

.heatmap-card {
  border: 1px solid rgba(148, 163, 184, 0.13);
  background: rgba(2, 6, 23, 0.58);
  border-radius: 0.5rem;
  padding: 1rem;
}

.cycle-projection-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.62));
  border-radius: 0.5rem;
  padding: 1rem;
}

.fertility-progress {
  background: linear-gradient(90deg, var(--cyan), var(--emerald), var(--rose));
  box-shadow: 0 0 26px rgba(52, 211, 153, 0.24), 0 0 24px rgba(251, 113, 133, 0.14);
}

.badge-violet,
.badge-cyan,
.badge-rose,
.badge-emerald {
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-violet {
  background: rgba(139, 92, 246, 0.14);
  color: #ddd6fe;
  border: 1px solid rgba(139, 92, 246, 0.26);
}

.badge-cyan {
  background: rgba(34, 211, 238, 0.14);
  color: #cffafe;
  border: 1px solid rgba(34, 211, 238, 0.26);
}

.badge-rose {
  background: rgba(251, 113, 133, 0.14);
  color: #ffe4e6;
  border: 1px solid rgba(251, 113, 133, 0.26);
}

.badge-emerald {
  background: rgba(52, 211, 153, 0.14);
  color: #d1fae5;
  border: 1px solid rgba(52, 211, 153, 0.26);
}

.field-error {
  border-color: rgba(251, 113, 133, 0.72) !important;
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.16);
}

.toast-region {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  display: grid;
  gap: 0.75rem;
  width: min(24rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: start;
  gap: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.5rem;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(13, 17, 23, 0.96));
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
  padding: 0.9rem 1rem;
  opacity: 0;
  transform: translateY(0.6rem);
  animation: toast-in 0.22s ease forwards;
}

.toast.success {
  border-color: rgba(52, 211, 153, 0.34);
}

.toast.error {
  border-color: rgba(251, 113, 133, 0.38);
}

.toast.info {
  border-color: rgba(34, 211, 238, 0.34);
}

.toast-title {
  font-weight: 800;
  line-height: 1.25;
}

.toast-message {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.toast.removing {
  animation: toast-out 0.18s ease forwards;
}

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(0.5rem);
  }
}

@media (max-width: 640px) {
  .toast-region {
    right: 0.75rem;
    bottom: 0.75rem;
    width: calc(100vw - 1.5rem);
  }
}
