* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.screen {
  display: none;
  width: 100%;
  max-width: 900px;
  padding: 2rem;
}

.screen.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  max-width: 420px;
  width: 100%;
}

.card h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  outline: none;
  transition: border-color 0.2s;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

input:focus {
  border-color: rgba(255, 255, 255, 0.5);
}

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 0.5rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-spin {
  font-size: 1.3rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #f7971e, #ffd200);
  color: #1a1a2e;
}

.btn-spin:hover {
  box-shadow: 0 6px 20px rgba(247, 151, 30, 0.5);
}

.error {
  color: #ff6b6b;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

/* Wheel layout */
.wheel-layout {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: 100%;
}

.wheel-container {
  position: relative;
  flex-shrink: 0;
}

.pointer {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.5rem;
  color: #ffd200;
  z-index: 10;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  filter: drop-shadow(0 0 6px rgba(255, 210, 0, 0.6));
}

#wheel-canvas {
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(102, 126, 234, 0.3), 0 0 80px rgba(102, 126, 234, 0.1);
}

.side-panel {
  flex: 1;
}

.side-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.side-panel p {
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.result-box {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  border: 1px solid rgba(255, 210, 0, 0.3);
}

.result-box h3 {
  margin-bottom: 0.5rem;
  color: #ffd200;
}

.prize-label {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0.5rem 0;
  color: #ffd200;
}

.result-note {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.75rem;
}

.win-celebration {
  max-width: 640px;
  width: 100%;
  text-align: center;
  opacity: 0;
  transform: scale(0.82);
  border-color: rgba(255, 210, 0, 0.45);
  background:
    radial-gradient(circle at 50% -18%, rgba(255, 224, 102, 0.38), rgba(255, 224, 102, 0) 58%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.win-celebration::before {
  content: '';
  position: absolute;
  inset: -30% -120% auto;
  height: 220px;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.2) 48%, transparent 76%);
  transform: translateX(-32%);
  pointer-events: none;
}

.win-celebration.is-visible {
  animation: winPop 700ms cubic-bezier(.2, 1.2, .35, 1) forwards, winGlow 1.6s ease-out;
}

.win-celebration.is-visible::before {
  animation: winShine 1100ms ease-out 120ms forwards;
}

.win-kicker {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 0.28rem 0.72rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
}

.win-prize-label {
  font-size: clamp(2.3rem, 6vw, 4rem);
  line-height: 1.12;
  font-weight: 800;
  color: #ffd200;
  text-shadow: 0 0 22px rgba(255, 210, 0, 0.46), 0 2px 0 rgba(35, 18, 0, 0.35);
  margin: 0.9rem 0 1rem;
  letter-spacing: 0.01em;
}

.win-subtitle {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.2rem;
  font-size: 1rem;
}

@keyframes winPop {
  0% { opacity: 0; transform: scale(0.82) translateY(18px); }
  58% { opacity: 1; transform: scale(1.05) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes winGlow {
  0% { box-shadow: 0 0 0 rgba(255, 210, 0, 0); }
  45% { box-shadow: 0 0 44px rgba(255, 210, 0, 0.5), 0 0 92px rgba(255, 210, 0, 0.22); }
  100% { box-shadow: 0 0 0 rgba(255, 210, 0, 0); }
}

@keyframes winShine {
  from { transform: translateX(-32%); }
  to { transform: translateX(56%); }
}

#wheel-screen.win-state {
  max-width: 760px;
}

#wheel-screen.win-state #wheel-layout {
  display: none !important;
}

/* Results overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.results-card {
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

.results-card h2 {
  margin-bottom: 1rem;
}

#results-list {
  text-align: left;
  margin-bottom: 1.5rem;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.result-row:last-child {
  border-bottom: none;
}

.result-name {
  font-weight: 600;
}

.result-prize {
  color: #ffd200;
  font-weight: 500;
}

footer {
  position: fixed;
  bottom: 1.5rem;
}

.link-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
}

.link-btn:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* =============================================
   LANDING PAGE
   ============================================= */

body.landing-page {
  background: #0a0a1a;
  min-height: 100vh;
  display: block;
}

/* Nav */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 26, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.landing-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.landing-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.01em;
}

/* Shared container */
.landing-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero */
.landing-hero {
  padding: 5rem 1.5rem 4rem;
}
.landing-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4rem;
  flex-wrap: wrap;
}
.landing-hero-copy {
  flex: 1;
  min-width: 280px;
}
.landing-h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1.25rem;
}
.landing-lead {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}
.btn-hero {
  background: linear-gradient(135deg, #6c5ce7, #a78bfa);
  font-size: 1.05rem;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
}
.btn-hero:hover {
  background: linear-gradient(135deg, #7d6ff0, #b89dfc);
}
.landing-sublead {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Demo wheel */
.landing-hero-demo {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.demo-wheel-wrap {
  position: relative;
}
.demo-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  color: #ffd200;
  filter: drop-shadow(0 0 6px rgba(255, 210, 0, 0.6));
  z-index: 1;
}
#demo-canvas {
  display: block;
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(108, 92, 231, 0.3);
}
.demo-spin-btn {
  font-size: 1rem;
  padding: 0.65rem 2rem;
}

/* Sections */
.landing-section-title {
  text-align: center;
  font-size: 1.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

/* Features grid */
.landing-features {
  padding: 4rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.5rem;
}
.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}
.feature-card p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.55;
}

/* Use cases */
.landing-use-cases {
  padding: 4rem 1.5rem;
}
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.use-case-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}
.use-case-card strong { color: #fff; }

/* Pricing */
.landing-pricing {
  padding: 4rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.landing-pricing-lead {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  max-width: 520px;
  margin: -1.5rem auto 2.5rem;
  line-height: 1.6;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  align-items: start;
}
.pricing-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  position: relative;
  text-align: center;
}
.pricing-card-featured {
  border-color: rgba(108, 92, 231, 0.6);
  background: rgba(108, 92, 231, 0.08);
  box-shadow: 0 0 30px rgba(108, 92, 231, 0.2);
}
.pricing-badge {
  display: inline-block;
  background: linear-gradient(135deg, #6c5ce7, #a78bfa);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}
.pricing-plan {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}
.pricing-price {
  font-size: 2.4rem;
  font-weight: 800;
  color: #ffd200;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  text-align: left;
}
.pricing-features li {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.pricing-note {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}
.pricing-note a { color: rgba(255, 255, 255, 0.6); }

/* Footer */
.landing-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.3);
}
.landing-footer a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}
.landing-footer a:hover { color: rgba(255, 255, 255, 0.8); }

/* =============================================
   POWERED BY BRANDING BADGE (free wheels only)
   ============================================= */

.pw-branding {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.01em;
}
.pw-branding a {
  color: rgba(167, 139, 250, 0.7);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}
.pw-branding a:hover {
  color: #a78bfa;
}


/* Prize builder */
.prize-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.62rem;
  padding: 0.42rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.prize-color {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0.15rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}

.prize-label-input {
  flex: 1;
  margin-bottom: 0;
  font-size: 1rem;
  border-radius: 12px;
  border-color: rgba(255,255,255,0.2);
}

.prize-del-btn {
  flex-shrink: 0;
  padding: 0.3rem 0.55rem;
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
  .wheel-layout {
    flex-direction: column;
    gap: 1.5rem;
  }

  .wheel-container {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }

  #wheel-canvas {
    max-width: 100%;
    height: auto;
  }

  .side-panel {
    text-align: center;
  }
}
