:root {
  --white: #ffffff;
  --primary: #1298ce;
  --gray: #5a5a5a;
  --light-blue: #30c4ff;
  --dark-blue: #065f82;
  --dark-orange: #cf7613;
  --light-orange: #e2991a;
  --bg: #f6fbfd;
  --error: #c0392b;

  --radius: 14px;
  --shadow: 0 6px 24px rgba(6, 95, 130, 0.12);
  --font: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--gray);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.stage {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

h1, h2 {
  color: var(--dark-blue);
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.2;
}
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); }

.lead {
  margin: 0 0 24px;
  font-size: 1rem;
  color: var(--gray);
}

/* Screens */
.screen { display: none; animation: fade .25s ease-out; }
.screen.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Form */
form { display: grid; gap: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .row { grid-template-columns: 1fr; } }

label { display: grid; gap: 6px; font-size: 0.92rem; font-weight: 500; color: var(--dark-blue); }
input[type=text], input[type=email], input[type=tel] {
  font: inherit;
  padding: 12px 14px;
  border: 1.5px solid #d8e6ee;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray);
  transition: border-color .15s, box-shadow .15s;
}
input[type=text]:focus, input[type=email]:focus, input[type=tel]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 152, 206, 0.18);
}

label.check {
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  font-weight: 400;
  color: var(--gray);
  font-size: 0.88rem;
  line-height: 1.5;
  cursor: pointer;
}
label.check input { margin-top: 3px; accent-color: var(--primary); width: 18px; height: 18px; }
.check-text a { color: var(--primary); text-decoration: underline; }

.btn-primary, .btn-secondary {
  font: inherit;
  font-weight: 600;
  padding: 14px 20px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .1s, background .15s, box-shadow .15s;
  margin-top: 6px;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(18, 152, 206, 0.35);
}
.btn-primary:hover { background: var(--dark-blue); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { background: #a8c8d6; cursor: not-allowed; box-shadow: none; }

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  margin-top: 18px;
}
.btn-secondary:hover { background: var(--primary); color: var(--white); }

.error-msg {
  margin: 0;
  padding: 10px 14px;
  background: #fdecea;
  color: var(--error);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

/* Wheel */
.wheel-wrap {
  position: relative;
  width: min(100%, 540px);
  aspect-ratio: 1;
  margin: 12px auto 24px;
}
#wheel {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 10px 30px rgba(6, 95, 130, 0.2));
}
.pointer {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 30px solid var(--dark-blue);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
  z-index: 2;
}

#wheel-status { text-align: center; font-weight: 500; color: var(--dark-blue); }

/* Result */
.prize-card {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}
.prize-card img {
  width: min(60vw, 260px);
  height: auto;
  display: block;
}
.prize-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

/* Result screen reveal animation */
#screen-result.is-active .prize-card { animation: pop .4s cubic-bezier(.2,.9,.3,1.4); }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
