:root {
  --bg: #0f1226;
  --card: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.18);
  --text: #f6f7ff;
  --muted: #c4c8df;
  --accent: #ffbf69;
  --accent-2: #7dd3fc;
  --ok: #34d399;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 10%, #1f2a62 0%, var(--bg) 45%, #090b18 100%);
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(125, 211, 252, 0.18), transparent 35%),
    radial-gradient(circle at 10% 70%, rgba(255, 191, 105, 0.14), transparent 40%);
  pointer-events: none;
}

.page {
  width: min(1080px, 94vw);
  margin: 2rem auto 3rem;
  display: grid;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  padding: 1.2rem;
}

.hero {
  padding: 1.4rem;
}

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

h1, h2 {
  margin: 0.3rem 0 0.6rem;
}

h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.lead,
.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.section-head {
  margin-bottom: 1rem;
}

.wheel-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1rem;
  align-items: start;
}

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

#wheelCanvas {
  width: min(100%, 460px);
  height: auto;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

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

.panel h2 {
  margin-top: 0;
}

.muted {
  color: var(--muted);
  margin: 0 0 0.7rem;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  padding: 0.7rem 0.8rem;
  font: inherit;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(125, 211, 252, 0.5);
  outline-offset: 1px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.65rem 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

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

.btn.primary {
  background: linear-gradient(90deg, var(--accent), #ffd6a5);
  color: #2d1b00;
}

.btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text);
}

.status {
  margin: 0.8rem 0 0;
  min-height: 1.2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.status.ok {
  color: var(--ok);
}

.result {
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  min-height: 180px;
  padding: 0.9rem;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.8rem;
  background: rgba(0, 0, 0, 0.2);
}

@media (max-width: 740px) {
  .wheel-layout {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }
}
