:root {
  --orange: #ff6804;
  --dark: #0d1016;
  --panel: #ffffff;
  --line: rgba(17, 24, 39, 0.1);
  --text: #101218;
  --muted: #5c6573;
  --green: #b9ff3c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    linear-gradient(rgba(12, 18, 28, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 18, 28, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #fbfcfd 0%, #eff3f8 55%, #f8fafc 100%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
  color: var(--text);
  min-height: 100svh;
  overflow-x: hidden;
}

.app {
  width: min(960px, 100%);
  margin: auto;
  padding: max(38px, calc(env(safe-area-inset-top) + 28px)) 16px 42px;
}

.hero {
  text-align: center;
  padding: 12px 0 16px;
}

.eyebrow {
  display: none;
}

h1 {
  font-size: clamp(31px, 8vw, 58px);
  line-height: 0.98;
  margin: 12px 0 8px;
  letter-spacing: 0;
}

h1 span {
  color: var(--orange);
}

p {
  color: var(--muted);
  font-size: clamp(14px, 4vw, 17px);
  line-height: 1.45;
  margin: 0 auto;
  max-width: 680px;
}

.card {
  position: relative;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(22, 31, 45, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 22px;
  backdrop-filter: blur(20px);
}

.form-card {
  max-width: 520px;
  margin: 16px auto;
}

.form-card h2 {
  margin: 0 0 16px;
  font-size: clamp(20px, 5vw, 25px);
}

label {
  display: block;
  color: #252b35;
  font-weight: 700;
  margin: 12px 0 0;
}

input {
  width: 100%;
  margin-top: 7px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 14px 12px;
  color: var(--text);
  font-size: clamp(14px, 4vw, 17px);
  outline: none;
}

input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 104, 4, 0.16);
}

.primary {
  width: 100%;
  margin-top: 18px;
  border: 0;
  border-radius: 8px;
  background: #ff6804;
  color: white;
  font-weight: 900;
  font-size: clamp(14px, 4vw, 17px);
  letter-spacing: 0.04em;
  padding: 16px 18px;
  box-shadow: 0 18px 45px rgba(255, 104, 4, 0.32);
  cursor: pointer;
  transition: all 0.2s ease;
}

.primary:active:not(:disabled) {
  transform: scale(0.98);
}

.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.form-card small {
  display: block;
  margin-top: 12px;
  color: #657080;
  font-size: clamp(12px, 3vw, 14px);
}

.hidden {
  display: none !important;
}

.wheel-card {
  max-width: 600px;
  margin: 12px auto;
  text-align: center;
  overflow: hidden;
  padding: 10px 0 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.wheel-card:before {
  display: none;
}

canvas {
  position: relative;
  width: min(88vw, 500px);
  aspect-ratio: 1;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 24px 42px rgba(22, 31, 45, 0.2));
  transition: transform 7s cubic-bezier(0.09, 0.68, 0.04, 1);
  will-change: transform;
}

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

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 20;
}

.modal-card {
  width: min(520px, 95%);
  position: relative;
  border-radius: 8px;
  padding: 26px;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.12);
  box-shadow: 0 40px 100px rgba(15, 23, 42, 0.28);
  text-align: center;
  max-height: 90vh;
  overflow-y: auto;
}

.x {
  position: absolute;
  right: 14px;
  top: 14px;
  border: 1px solid var(--line);
  background: #f4f6f9;
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.x:hover {
  background: var(--orange);
}

.prize-title {
  font-size: clamp(28px, 7vw, 36px);
  line-height: 1;
  margin: 10px 0;
  color: var(--text);
}

.account-prize {
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 700;
  color: #ff9a3d;
  margin: 8px 0 4px;
}

.claim {
  display: inline-flex;
  margin: 14px 0;
  padding: clamp(10px, 3vw, 12px) clamp(14px, 5vw, 18px);
  border-radius: 8px;
  background: #f4f6f9;
  color: #07080c;
  font-size: clamp(20px, 6vw, 30px);
  font-weight: 950;
  letter-spacing: 0.12em;
  word-break: break-all;
}

.badge {
  display: inline-flex;
  color: #111;
  background: var(--green);
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 900;
  font-size: clamp(11px, 3vw, 12px);
}

.tee {
  width: clamp(140px, 50vw, 190px);
  margin: 8px auto 0;
  display: block;
}

.redeem {
  display: inline-flex;
  text-decoration: none;
  margin-top: 15px;
  padding: 14px 18px;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font-weight: 900;
  font-size: clamp(13px, 3vw, 15px);
  transition: all 0.2s ease;
  cursor: pointer;
}

.redeem:active {
  transform: scale(0.98);
}

.cta-btn {
  display: inline-flex;
  text-decoration: none;
  margin-top: 18px;
  padding: 16px 24px;
  border-radius: 8px;
  background: #ff6804;
  color: #fff;
  font-weight: 900;
  font-size: clamp(13px, 3vw, 15px);
  letter-spacing: 0.05em;
  box-shadow: 0 12px 30px rgba(255, 104, 4, 0.3);
  transition: all 0.2s ease;
  cursor: pointer;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(255, 104, 4, 0.4);
}

.cta-btn:active {
  transform: scale(0.98);
}

.note {
  color: #657080;
  margin-top: 12px;
  font-size: clamp(12px, 3vw, 14px);
}

@keyframes pulse {
  50% {
    opacity: 0.55;
    transform: scale(1.06);
  }
}

/* Mobile optimizations */
@media (max-width: 640px) {
  .app {
    padding: max(34px, calc(env(safe-area-inset-top) + 26px)) 14px 32px;
  }

  .hero {
    padding: 10px 0 14px;
  }

  .form-card {
    margin: 12px auto;
    padding: 18px;
  }

  .wheel-card {
    margin: 8px auto;
    padding-top: 10px;
  }

  input {
    padding: 12px 10px;
  }

  .pointer {
    top: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 32px solid var(--orange);
  }

  .modal-card {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  canvas {
    width: min(90vw, 430px);
    height: auto;
  }

  .claim {
    font-size: clamp(16px, 5vw, 24px);
    padding: 8px 12px;
  }

  .prize-title {
    font-size: clamp(24px, 6vw, 32px);
  }
}
