@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Space+Grotesk:wght@400;500;600&display=swap');

:root {
  color-scheme: light;
  --cream: #f6f0e4;
  --poinsettia: #b12f2f;
  --forest: #1f3d2f;
  --pine: #2d5643;
  --gold: #d6b064;
  --ink: #1a1a1a;
  --shadow: rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #f7ead1 0%, #f3e2c4 30%, #e7d2b4 65%, #e1c7a4 100%);
  min-height: 100vh;
}

.glow {
  position: fixed;
  inset: -30% 5% auto 5%;
  height: 60vh;
  background: radial-gradient(circle, rgba(214, 176, 100, 0.45) 0%, rgba(214, 176, 100, 0) 70%);
  filter: blur(40px);
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.hero {
  text-align: left;
  animation: float-in 0.8s ease-out;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--pine);
  margin: 0 0 8px;
  font-size: 0.75rem;
}

h1 {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(2.4rem, 4vw, 4rem);
  margin: 0;
  color: var(--poinsettia);
}

.lead {
  max-width: 640px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #2b2b2b;
  margin: 16px 0 0;
}

.panel {
  margin-top: 32px;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 40px var(--shadow);
  backdrop-filter: blur(12px);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-weight: 600;
  color: var(--forest);
}

.helper {
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff8e9;
  border: 1px dashed rgba(31, 61, 47, 0.25);
  font-weight: 500;
  color: #2b2b2b;
  line-height: 1.6;
}

textarea {
  min-height: 160px;
  padding: 12px 14px;
  font-size: 0.95rem;
  border: 1px solid rgba(31, 61, 47, 0.2);
  border-radius: 16px;
  background: #fffdf8;
  resize: vertical;
}

textarea:focus {
  outline: 2px solid rgba(177, 47, 47, 0.4);
  border-color: transparent;
}


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

button {
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
}

.primary {
  background: var(--poinsettia);
  color: #fff;
  box-shadow: 0 12px 20px rgba(177, 47, 47, 0.28);
}

.ghost {
  background: transparent;
  color: var(--forest);
  border: 1px solid rgba(31, 61, 47, 0.3);
}

.note {
  margin-top: 16px;
  font-size: 0.95rem;
  color: var(--pine);
}

.wheel-panel {
  margin-top: 36px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.2fr);
  gap: 24px;
  align-items: center;
}

.wheel-info h2 {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: 2rem;
  color: var(--forest);
  margin-bottom: 8px;
}

.status {
  font-size: 1rem;
  color: #2f2f2f;
  margin: 6px 0;
}

.wheel-wrap {
  position: relative;
  display: grid;
  place-items: center;
  padding: 20px;
}

.wheel {
  width: min(420px, 80vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 55%),
    conic-gradient(
      from 0deg,
      rgba(177, 47, 47, 0.12),
      rgba(214, 176, 100, 0.2),
      rgba(31, 61, 47, 0.12),
      rgba(177, 47, 47, 0.12)
    );
  border: 3px solid rgba(31, 61, 47, 0.25);
  position: relative;
  transition: transform 2.4s cubic-bezier(0.2, 0.7, 0.1, 1);
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.08),
    0 18px 30px rgba(0, 0, 0, 0.15);
}

.wheel-item {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center;
  text-align: center;
  font-weight: 600;
  color: var(--forest);
  font-size: 0.85rem;
  width: 120px;
}

.wheel-item span {
  display: inline-block;
  background: rgba(255, 255, 255, 0.92);
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.wheel-item.active span {
  background: rgba(214, 176, 100, 0.35);
  color: #6b4f1c;
}

.pointer {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 18px solid var(--poinsettia);
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.18));
  z-index: 2;
}

.wheel::after {
  content: "";
  position: absolute;
  inset: 45% 45%;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8e9, rgba(214, 176, 100, 0.25));
  border: 2px solid rgba(31, 61, 47, 0.2);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.12);
}

.results {
  margin-top: 40px;
}

.results h2 {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: 2rem;
  color: var(--forest);
  margin-bottom: 16px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(31, 61, 47, 0.92);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.card {
  background: #fffdf6;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(31, 61, 47, 0.14);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(20px);
  animation: card-in 0.6s ease forwards;
}

.card h3 {
  margin: 0 0 10px;
  color: var(--poinsettia);
  font-size: 1.2rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge.good {
  background: rgba(214, 176, 100, 0.25);
  color: #6b4f1c;
}

.badge.bad {
  background: rgba(177, 47, 47, 0.18);
  color: #7d2525;
}

.detail {
  margin: 10px 0 0;
  color: #2f2f2f;
  line-height: 1.5;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 720px) {
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .wheel-panel {
    grid-template-columns: 1fr;
  }
}
