﻿:root {
  --bg: #f4efe6;
  --surface: rgba(255, 252, 246, 0.82);
  --surface-strong: #fffdf8;
  --text: #17203a;
  --muted: #67718d;
  --line: rgba(23, 32, 58, 0.1);
  --accent: #ff6b35;
  --accent-2: #ffd166;
  --accent-3: #2ec4b6;
  --accent-4: #3a86ff;
  --accent-5: #ef476f;
  --shadow: 0 24px 70px rgba(23, 32, 58, 0.14);
  --radius-xl: 32px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 209, 102, 0.45), transparent 24%),
    radial-gradient(circle at right 15%, rgba(46, 196, 182, 0.22), transparent 28%),
    linear-gradient(180deg, #fff8ef 0%, var(--bg) 42%, #efe7d9 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 85%);
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  margin-bottom: 26px;
  background: rgba(255, 253, 248, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(23, 32, 58, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-5));
  box-shadow: 0 18px 28px rgba(255, 107, 53, 0.3);
}

.brand strong,
.brand span,
.top-nav a,
.section-copy h2,
.feature-card h3,
.faq-list h3,
.spin-btn,
.winner-card h2,
.editor-panel h1 {
  font-family: "Sora", sans-serif;
}

.brand div {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 1rem;
}

.brand span {
  font-size: 0.84rem;
  color: var(--muted);
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.top-nav a {
  text-decoration: none;
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.top-nav a:hover {
  background: rgba(23, 32, 58, 0.06);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.editor-panel {
  max-width: 1400px;
}

.panel,
.content-block {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel {
  border-radius: var(--radius-xl);
  padding: 28px;
}

.panel-heading h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  margin: 10px 0 14px;
}

.panel-heading p:last-child,
.section-copy p,
.feature-card p,
.faq-list p {
  color: var(--muted);
  line-height: 1.65;
}

.eyebrow {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.field-label,
.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.import-box {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px dashed rgba(23, 32, 58, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.66);
}

.import-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #ff8f5a);
  color: white;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(255, 107, 53, 0.24);
}

.import-help {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.entries-input {
  width: 100%;
  min-height: 340px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.84);
  font: inherit;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.entries-input:focus {
  outline: 2px solid rgba(58, 134, 255, 0.22);
  border-color: rgba(58, 134, 255, 0.4);
}

.toolbar,
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.ghost-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.ghost-btn:hover {
  transform: translateY(-1px);
  background: white;
  border-color: rgba(23, 32, 58, 0.18);
}

.stats-row {
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.65);
}

.stats-row strong {
  font-size: 1.05rem;
}

.wheel-panel {
  min-height: 100%;
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.wheel-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 700px;
  margin: -6px -6px 0;
  padding: 28px 20px 36px;
  border-radius: 28px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.92) 0%, rgba(255, 248, 239, 0.8) 40%, rgba(255, 209, 102, 0.28) 100%);
  overflow: hidden;
}

.celebration-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.wheel-stage::before,
.wheel-stage::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.wheel-stage::before {
  width: 680px;
  height: 680px;
  filter: blur(12px);
}

.wheel-stage::after {
  width: 820px;
  height: 820px;
  border: 1px dashed rgba(23, 32, 58, 0.08);
}

.stage-actions {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
}

.fullscreen-btn {
  backdrop-filter: blur(12px);
}

.wheel-frame {
  position: relative;
  width: min(84vw, 760px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  z-index: 3;
}

.pointer {
  position: absolute;
  top: 18px;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 38px solid var(--text);
  transform: translateX(-50%);
  z-index: 6;
  filter: drop-shadow(0 10px 12px rgba(23, 32, 58, 0.18));
}

.wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 14px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 28px 55px rgba(23, 32, 58, 0.22), inset 0 2px 0 rgba(255, 255, 255, 0.9);
  transition: transform 6.2s cubic-bezier(0.12, 0.8, 0.1, 1);
  overflow: hidden;
}

.wheel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, transparent 58%, rgba(255, 255, 255, 0.14) 100%);
}

.wheel-labels {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.wheel-label {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44%;
  transform-origin: 0 0;
  text-align: right;
  padding-right: 68px;
  font-size: clamp(0.72rem, 1vw, 0.95rem);
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spin-btn {
  position: absolute;
  width: 138px;
  height: 138px;
  border-radius: 50%;
  border: 10px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(180deg, #18243f, #0d1325);
  color: white;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(13, 19, 37, 0.35);
  z-index: 2;
}

.spin-btn:hover {
  transform: scale(1.03);
}

.spin-btn:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.winner-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 20px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
}

.winner-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(24px);
  width: min(460px, calc(100vw - 32px));
  padding: 18px 22px;
  border-radius: 26px;
  background: rgba(18, 24, 43, 0.92);
  color: white;
  box-shadow: 0 26px 60px rgba(13, 19, 37, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease, transform 260ms ease;
  z-index: 30;
}

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

.winner-toast-label {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 209, 102, 0.92);
  font-weight: 700;
}

.winner-toast h3 {
  margin: 8px 0 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
}

.winner-card h2 {
  margin: 8px 0 0;
  font-size: clamp(1.25rem, 2vw, 1.85rem);
}

.wheel-stage:fullscreen {
  min-height: 100vh;
  margin: 0;
  padding: 36px;
  border-radius: 0;
}

.wheel-stage:fullscreen::before {
  width: min(86vh, 980px);
  height: min(86vh, 980px);
}

.wheel-stage:fullscreen::after {
  width: min(94vh, 1120px);
  height: min(94vh, 1120px);
}

.wheel-stage:fullscreen .wheel-frame {
  width: min(86vh, calc(100vw - 120px));
}

.wheel-stage:fullscreen .pointer {
  top: 28px;
}

body.fullscreen-active {
  overflow: hidden;
}

.content-block {
  margin-top: 28px;
  padding: 34px;
  border-radius: var(--radius-xl);
}

.section-copy {
  max-width: 760px;
}

.section-copy h2 {
  margin: 8px 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.feature-grid,
.faq-list {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card,
.faq-list article {
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.feature-card span {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.16), rgba(58, 134, 255, 0.16));
  color: var(--accent);
  font-weight: 800;
}

.feature-card h3,
.faq-list h3 {
  margin: 0 0 10px;
}

.faq-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1080px) {
  .hero-grid,
  .feature-grid,
  .faq-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 14px;
  }

  .site-header,
  .winner-card,
  .stats-row {
    border-radius: 28px;
  }

  .site-header,
  .winner-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel,
  .content-block {
    padding: 22px;
  }

  .wheel-panel {
    padding: 16px;
  }

  .entries-input {
    min-height: 260px;
  }

  .wheel-stage {
    min-height: 460px;
    margin: 0;
    padding: 58px 10px 18px;
  }

  .wheel-frame {
    width: min(96vw, 420px);
  }

  .spin-btn {
    width: 112px;
    height: 112px;
    font-size: 1.1rem;
  }

  .pointer {
    top: 14px;
  }

  .stage-actions {
    top: 12px;
    right: 12px;
  }

  .wheel-stage:fullscreen {
    padding: 70px 12px 24px;
  }

  .wheel-stage:fullscreen .wheel-frame {
    width: min(94vw, 94vh);
  }

  .winner-toast {
    bottom: 16px;
    padding: 16px 18px;
    border-radius: 22px;
  }
}
