:root {
  --bg-0: #14183b;
  --bg-1: #293a87;
  --bg-2: #6f5db2;
  --panel: rgba(241, 234, 255, 0.15);
  --edge: rgba(212, 226, 255, 0.45);
  --text: #f8f5ff;
  --muted: #d6d8ff;
  --accent: #ff9ad6;
  --accent-2: #b5ccff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Space Mono", monospace;
  background:
    radial-gradient(circle at 20% 20%, rgba(196, 223, 255, 0.35), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(255, 176, 232, 0.28), transparent 40%),
    radial-gradient(circle at 60% 70%, rgba(151, 123, 255, 0.22), transparent 50%),
    linear-gradient(140deg, var(--bg-0), var(--bg-1) 50%, var(--bg-2));
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: repeating-radial-gradient(circle at 0 0, #fff 0 1px, transparent 1px 3px);
}

.layout {
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.hero,
.wheel-section,
.panel {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(10px);
}

.kicker {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

h1 {
  margin: 8px 0;
  line-height: 0.85;
  font-size: clamp(3rem, 9vw, 6rem);
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.06em;
}

.quote {
  margin: 0;
  max-width: 70ch;
  color: #ece8ff;
}

.motto {
  margin: 10px 0 0;
  color: var(--accent-2);
}

.wheel-section {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.wheel-wrap {
  position: relative;
  width: min(92vw, 760px);
  aspect-ratio: 1 / 1;
}

canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(45, 53, 116, 0.7);
  box-shadow:
    0 0 0 2px rgba(225, 212, 255, 0.5),
    0 25px 60px rgba(17, 14, 45, 0.52);
}

.pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 34px solid #ffd2f1;
  z-index: 2;
}

.result {
  margin: 0;
  color: var(--accent-2);
}

.result-meta {
  margin: 0;
  color: #efeaff;
  font-size: 0.92rem;
  opacity: 0.9;
}

.panel {
  display: grid;
  gap: 18px;
}

.panel-row {
  display: grid;
  gap: 12px;
}

.stats {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.stats article {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: rgba(21, 23, 61, 0.35);
}

.stats h2 {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
}

.stats p {
  margin: 6px 0 0;
  font-size: 1.2rem;
  color: var(--accent-2);
}

.locked {
  margin: 0;
  color: var(--muted);
  border-top: 1px solid var(--edge);
  padding-top: 14px;
}

.obs-tools h2 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.obs-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.obs-row input,
.obs-row button {
  border: 1px solid rgba(223, 217, 255, 0.5);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.obs-row input {
  color: var(--text);
  background: rgba(21, 24, 60, 0.55);
}

.obs-row button {
  color: #2a2244;
  background: linear-gradient(180deg, #ffd5ef, #b9d7ff);
  font-weight: 700;
  cursor: pointer;
}

.copy-status {
  margin: 0;
  color: #eee8ff;
  font-size: 0.85rem;
}

body.obs-mode {
  background: transparent;
}

body.obs-mode .noise,
body.obs-mode .hero,
body.obs-mode .obs-tools,
body.obs-mode .locked {
  display: none;
}

body.obs-mode .layout {
  max-width: 100%;
  padding: 10px;
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
}

body.obs-mode .wheel-section,
body.obs-mode .panel {
  width: min(95vw, 1100px);
  background: rgba(40, 45, 105, 0.25);
}

body.obs-mode .panel {
  display: none;
}

body.obs-mode .wheel-wrap {
  width: min(65vh, 70vw, 760px);
}

body.obs-mode .result-meta {
  font-size: 1rem;
  color: #fff3ff;
}

@media (min-width: 980px) {
  .layout {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }

  .panel {
    grid-column: 1 / -1;
  }
}
