* {
  box-sizing: border-box;
}

:root {
  --bg1: #0f172a;
  --bg2: #1e1b4b;
  --card: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.18);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.75);
  --accent: #facc15;
  --shadow: 0 25px 60px rgba(0,0,0,.35);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, #312e81 0%, transparent 35%),
    radial-gradient(circle at bottom right, #0ea5e9 0%, transparent 30%),
    linear-gradient(135deg, var(--bg1), var(--bg2));
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .25;
  pointer-events: none;
}

.glow-1 {
  top: -60px;
  left: -60px;
  background: #a855f7;
}

.glow-2 {
  right: -80px;
  bottom: -80px;
  background: #06b6d4;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 32px 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.left {
  padding: 34px;
}

.right {
  padding: 24px;
}

.badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(250, 204, 21, .16);
  border: 1px solid rgba(250, 204, 21, .3);
  color: #fde68a;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: .08em;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  margin: 18px 0 12px;
}

.subtitle {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 22px;
}

.form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-size: .96rem;
  color: rgba(255,255,255,.9);
}

input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: white;
  outline: none;
  font-size: 1rem;
}

input::placeholder {
  color: rgba(255,255,255,.45);
}

input:focus {
  border-color: rgba(250, 204, 21, .65);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, .12);
}

.btn-primary,
.btn-secondary {
  border: 0;
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform .15s ease, opacity .15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #111827;
  margin-top: 8px;
}

.btn-secondary {
  display: inline-block;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  margin-top: 8px;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.wheel-wrap {
  position: relative;
  width: min(100%, 520px);
  margin: 0 auto;
}

canvas {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 20px 35px rgba(0,0,0,.35));
}

.pointer {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 34px solid #fff;
  z-index: 2;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.4));
}

.legend {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px 16px;
  color: rgba(255,255,255,.88);
  font-size: .95rem;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
}

.c1 { background: #7c3aed; }
.c2 { background: #ec4899; }
.c3 { background: #06b6d4; }
.c4 { background: #22c55e; }
.c5 { background: #f59e0b; }
.c6 { background: #ef4444; }

.result {
  margin-top: 20px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}

.result h2 {
  margin: 0 0 8px;
}

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

.hidden {
  display: none;
}

@media (max-width: 920px) {
  .container {
    grid-template-columns: 1fr;
    padding: 20px 0 28px;
  }

  .left, .right {
    padding: 22px;
  }

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