/* ===== Variables ===== */
:root {
  --gold: #d4af37;
  --gold-light: #f4e4a6;
  --gold-dark: #9a7b2e;
  --bg-dark: #0d0d0f;
  --bg-card: #16161a;
  --bg-card-hover: #1c1c22;
  --text: #f0ebe3;
  --text-muted: #a09a8f;
  --accent: #c41e3a;
  --accent-soft: rgba(196, 30, 58, 0.2);
  --green: #2d8a5e;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: var(--bg-dark);
  overflow-x: hidden;
}

.bg-pattern {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(212, 175, 55, 0.08), transparent),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 40px,
      rgba(212, 175, 55, 0.02) 40px,
      rgba(212, 175, 55, 0.02) 41px
    );
  pointer-events: none;
  z-index: 0;
}

/* ===== Header ===== */
.header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}
.logo {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}
.tagline {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
}
.header-link {
  color: var(--gold);
  text-decoration: none;
}
.header-link:hover {
  text-decoration: underline;
}

/* ===== Main ===== */
.main {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.hero {
  text-align: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}
.hero-sub {
  margin: 0 0 2rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.5;
}

/* ===== Roulette ===== */
.roulette-wrap {
  margin: 0 auto 2rem;
  display: flex;
  justify-content: center;
}
.roulette-container {
  position: relative;
  width: min(320px, 90vw);
}
.roulette-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: var(--gold);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  z-index: 10;
}
.roulette-wheel {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid var(--gold-dark);
  box-shadow:
    inset 0 0 40px rgba(0,0,0,0.6),
    0 0 0 3px var(--gold),
    0 12px 40px rgba(0,0,0,0.5);
  background: var(--bg-card);
  transition: transform 0.1s linear;
  display: flex;
  align-items: center;
  justify-content: center;
}
.roulette-wheel .roulette-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.roulette-segment-text {
  font-weight: 700;
  font-family: var(--font-body), system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  pointer-events: none;
  text-shadow: 0 0 1px rgba(255,255,255,0.5);
}

.btn-spin {
  display: block;
  width: 100%;
  max-width: 200px;
  margin: 1.5rem auto 0;
  padding: 0.9rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--bg-dark);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-spin:hover:not(:disabled) {
  transform: scale(1.03);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.5);
}
.btn-spin:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

/* ===== Prize announcement ===== */
.prize-announcement {
  background: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}
.prize-announcement[hidden] {
  display: none;
}
.prize-label {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.prize-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold);
}
.prize-cta {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Form ===== */
.form-section {
  margin-top: 2rem;
}
.form-card {
  background: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.form-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  color: var(--text);
}
.form-desc {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.register-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}
.field input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-dark);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}
.field input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}
.field input:invalid:not(:placeholder-shown):not(:focus) {
  border-color: var(--accent);
}

.btn-submit {
  margin-top: 0.5rem;
  padding: 0.9rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--bg-dark);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-submit:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.form-note {
  margin: 1.25rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem 1rem;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}
.footer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}
.modal[hidden] {
  display: none;
}
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow);
}
.modal-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 1rem;
  color: var(--gold);
}
.modal-content p {
  margin: 0 0 1.5rem;
  color: var(--text);
  font-size: 0.95rem;
}
.btn-close-modal {
  padding: 0.6rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bg-dark);
  background: var(--gold);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.btn-close-modal:hover {
  background: var(--gold-light);
}
