:root {
  --bg-top: #f8f2e8;
  --bg-bottom: #e7dcc8;
  --panel: rgba(31, 27, 22, 0.9);
  --panel-soft: rgba(255, 248, 235, 0.1);
  --text: #fff8ee;
  --muted: rgba(255, 248, 235, 0.75);
  --accent: #ff7a00;
  --accent-strong: #ffd166;
  --danger: #d1495b;
  --shadow: 0 24px 80px rgba(18, 14, 10, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 209, 102, 0.65), transparent 28%),
    radial-gradient(circle at bottom right, rgba(209, 73, 91, 0.18), transparent 24%),
    linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
  display: grid;
  place-items: center;
  padding: 24px;
}

.app-shell {
  width: min(100%, 960px);
}

.panel {
  background:
    linear-gradient(160deg, rgba(31, 27, 22, 0.96), rgba(58, 43, 24, 0.92));
  border: 1px solid rgba(255, 248, 235, 0.14);
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hidden {
  display: none;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--accent-strong);
}

.hero-brand {
  display: block;
  margin-bottom: 18px;
}

.hero-eyebrow {
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.12em 0.18em;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(2.8rem, 9vw, 6rem);
  letter-spacing: 0.08em;
  line-height: 0.95;
  text-transform: uppercase;
}

.hero-word {
  display: inline-block;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.hero-word-push,
.hero-word-up {
  color: var(--text);
}

.hero-word-roulette {
  color: var(--accent-strong);
}

.hero-logo-wheel {
  position: relative;
  width: 0.92em;
  height: 0.92em;
  display: inline-block;
  border-radius: 50%;
  background:
    conic-gradient(
      from -36deg,
      #ff7a00 0deg 72deg,
      #ffd166 72deg 144deg,
      #d1495b 144deg 216deg,
      #f4a261 216deg 288deg,
      #e9c46a 288deg 360deg
    );
  border: 0.08em solid rgba(255, 248, 235, 0.16);
  box-shadow:
    inset 0 0 0 0.07em rgba(31, 27, 22, 0.2),
    0 0.16em 0.32em rgba(0, 0, 0, 0.22);
  transform: translateY(0.02em) rotate(-18deg);
}

.hero-logo-wheel-inner {
  position: absolute;
  inset: 0.16em;
  border-radius: 50%;
  border: 0.05em dashed rgba(31, 27, 22, 0.36);
}

.hero-logo-wheel-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.22em;
  height: 0.22em;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(31, 27, 22, 0.94);
  border: 0.04em solid rgba(255, 248, 235, 0.16);
}

.hero-logo-wheel-pointer {
  position: absolute;
  top: -0.08em;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 0.1em solid transparent;
  border-right: 0.1em solid transparent;
  border-top: 0.18em solid var(--text);
  filter: drop-shadow(0 0.08em 0.08em rgba(0, 0, 0, 0.26));
}

h1,
h2 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  letter-spacing: 0.04em;
  line-height: 0.95;
}

h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
}

h2 {
  font-size: clamp(2.2rem, 6vw, 4rem);
}

.intro {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 16px 0 0;
}

.setup-form {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}

.field {
  display: grid;
  gap: 10px;
}

.time-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.field-label,
.field span,
.display-label,
.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 248, 235, 0.15);
  background: var(--panel-soft);
  color: var(--text);
}

input:focus,
select:focus,
button:focus {
  outline: 2px solid rgba(255, 209, 102, 0.8);
  outline-offset: 2px;
}

option {
  color: #1f1b16;
}

.wheel-section {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 248, 235, 0.06);
  border: 1px solid rgba(255, 248, 235, 0.1);
}

.wheel-copy {
  display: grid;
  gap: 8px;
}

.wheel-helper,
.wheel-result-text {
  margin: 0;
  color: var(--muted);
}

.wheel-stage {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 1;
  margin: 0 auto;
}

.wheel-pointer {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 26px solid var(--accent-strong);
  z-index: 2;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
}

.wheel {
  --rotation: 0deg;
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 10px solid rgba(255, 248, 235, 0.14);
  background:
    conic-gradient(
      from -36deg,
      #ff7a00 0deg 72deg,
      #ffd166 72deg 144deg,
      #d1495b 144deg 216deg,
      #f4a261 216deg 288deg,
      #e9c46a 288deg 360deg
    );
  transform: rotate(var(--rotation));
  transition: transform 4.2s cubic-bezier(0.12, 0.82, 0.18, 1);
  box-shadow:
    inset 0 0 0 8px rgba(31, 27, 22, 0.18),
    0 16px 40px rgba(0, 0, 0, 0.22);
}

.wheel-number {
  position: absolute;
  top: 50%;
  left: 50%;
  color: rgba(31, 27, 22, 0.82);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  text-shadow: 0 2px 6px rgba(255, 248, 235, 0.25);
  transform-origin: center center;
}

.wheel-number-1 {
  transform: translate(-50%, -50%) rotate(0deg) translateY(-112px) rotate(0deg);
}

.wheel-number-2 {
  transform: translate(-50%, -50%) rotate(72deg) translateY(-112px) rotate(-72deg);
}

.wheel-number-3 {
  transform: translate(-50%, -50%) rotate(144deg) translateY(-112px) rotate(-144deg);
}

.wheel-number-4 {
  transform: translate(-50%, -50%) rotate(216deg) translateY(-112px) rotate(-216deg);
}

.wheel-number-5 {
  transform: translate(-50%, -50%) rotate(288deg) translateY(-112px) rotate(-288deg);
}

.wheel-center {
  position: absolute;
  inset: 50%;
  width: 110px;
  height: 110px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(31, 27, 22, 0.92);
  border: 6px solid rgba(255, 248, 235, 0.18);
  color: var(--accent-strong);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.wheel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.wheel.is-spinning {
  filter: saturate(1.2) brightness(1.04);
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 15px 22px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 160ms ease,
    opacity 160ms ease,
    box-shadow 160ms ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ffb703);
  color: #23180d;
  box-shadow: 0 16px 40px rgba(255, 122, 0, 0.32);
}

.btn-secondary {
  background: rgba(255, 248, 235, 0.11);
  color: var(--text);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #f07167);
  color: white;
}

.session-top,
.actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.pill {
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 209, 102, 0.14);
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 700;
}

.display-card {
  margin-top: 28px;
  padding: 28px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(255, 122, 0, 0.22), transparent 42%),
    rgba(255, 248, 235, 0.06);
  border: 1px solid rgba(255, 248, 235, 0.1);
}

.display-time {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(4rem, 12vw, 8rem);
  line-height: 0.9;
  margin-top: 10px;
  letter-spacing: 0.06em;
}

.stats-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 24px 0 0;
}

.stat-card {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 248, 235, 0.06);
  border: 1px solid rgba(255, 248, 235, 0.08);
}

.stat-card.emphasis {
  background: linear-gradient(140deg, rgba(255, 122, 0, 0.18), rgba(255, 209, 102, 0.12));
}

.stat-value {
  margin: 10px 0 0;
  font-size: 1.5rem;
  font-weight: 800;
}

.stat-value.large {
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  letter-spacing: 0.04em;
}

.share-panel {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 248, 235, 0.06);
  border: 1px solid rgba(255, 248, 235, 0.08);
  align-items: center;
}

.share-copy {
  display: grid;
  gap: 8px;
}

.share-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.share-link {
  color: var(--accent-strong);
  text-decoration: none;
  word-break: break-all;
}

.qr-shell {
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 248, 235, 0.95);
  padding: 10px;
  justify-self: end;
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.actions {
  margin-top: 28px;
}

@media (max-width: 760px) {
  .panel {
    padding: 24px;
  }

  .hero-brand {
    margin-bottom: 14px;
  }

  .hero-eyebrow {
    gap: 0.08em 0.14em;
  }

  .time-row {
    grid-template-columns: 1fr;
  }

  .session-top,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

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

  .qr-shell {
    justify-self: start;
  }

  .wheel-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
