:root {
  --ink: #fff9ff;
  --muted: #f1dff1;
  --violet: #35116c;
  --purple: #7010a8;
  --pink: #e51b73;
  --gold: #ffe45c;
  --surface: rgba(26, 8, 57, 0.68);
  --border: rgba(255, 255, 255, 0.2);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: 'Quicksand', system-ui, sans-serif;
  line-height: 1.6;
  background: linear-gradient(120deg, var(--violet), var(--purple), var(--pink));
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

#background-logo {
  position: fixed;
  inset: 50% auto auto 50%;
  width: min(90vw, 900px);
  height: auto;
  opacity: 0.055;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
}

header, main, footer { position: relative; z-index: 1; }

header {
  padding: 1rem clamp(1rem, 4vw, 2rem);
  text-align: center;
  background: rgba(34, 7, 76, 0.74);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.site-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
}

header h1, h2, h3 {
  font-family: 'Rubik', system-ui, sans-serif;
  line-height: 1.15;
}

header h1 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.2rem); }

.tagline { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.95rem; }

#logo-container {
  flex: 0 0 72px;
  width: 72px;
  position: relative;
  transition: transform 0.25s ease;
}

#logo-container:hover { transform: rotate(-3deg) scale(1.06); }
#logo { display: block; width: 100%; border-radius: 13px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28); }

.eye {
  position: absolute;
  width: 4%;
  height: 4%;
  border-radius: 50%;
  background: #08030d;
  transform: translate(-50%, -50%);
}

.eye::after {
  content: '';
  position: absolute;
  top: 25%; left: 25%;
  width: 41%; height: 41%;
  border-radius: 50%;
  background: white;
}

#sparkle { position: absolute; font-size: 1.35rem; opacity: 0; pointer-events: none; }

main {
  width: min(100% - 2rem, 1060px);
  margin: 2rem auto 3rem;
}

.hero {
  padding: clamp(1.6rem, 5vw, 3.5rem);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px 24px 10px 10px;
  box-shadow: 0 20px 45px rgba(15, 1, 38, 0.3);
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h2 { max-width: 760px; margin: 0 auto 0.8rem; font-size: clamp(2rem, 6vw, 3.75rem); }
.hero p:not(.eyebrow) { max-width: 650px; margin: 0 auto; color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: 1.5rem; }

.aftergame-embed { width: 100%; margin-top: 1.5rem; padding: 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.aftergame-embed iframe { display: block; width: 100%; max-width: 100%; border: 0; border-radius: 10px; background: white; }
.aftergame-fallback { margin: 0.75rem auto 0 !important; font-size: 0.95rem !important; }
.aftergame-fallback a { display: inline-block; padding: 0.65rem 1.1rem; border-radius: 999px; background: var(--gold); color: #261039; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.65rem 1.1rem;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--gold);
  color: #261039;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover { color: #261039; background: #fff7ac; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24); transform: translateY(-2px); }
.button--secondary { border-color: rgba(255,255,255,.55); background: transparent; color: white; }
.button--secondary:hover { background: rgba(255,255,255,.15); color: white; }

.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }

.card {
  padding: clamp(1.3rem, 3vw, 2rem);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 25px rgba(15, 1, 38, 0.17);
}

.card--wide { grid-column: 1 / -1; }
.card h2 { margin: 0 0 0.75rem; font-size: 1.35rem; }
.card p { margin: 0.65rem 0; color: var(--muted); }
.card strong { color: white; }
.card .button { margin-top: 0.35rem; }

.link-list { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1rem; }

a { color: var(--gold); font-weight: 700; }
a:hover { color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

footer {
  padding: 1.25rem 1rem;
  color: var(--muted);
  text-align: center;
  background: rgba(10, 2, 25, 0.45);
  font-size: 0.9rem;
}
footer p { margin: 0; }

.message { display: none; }
.message.success, .message.error { display: block; margin-top: 1em; padding: 1em; border-radius: 8px; background: white; color: #190628; text-align: left; }
.success { border-left: 5px solid #23883b; }
.error { border-left: 5px solid #d7263d; }

.form-card { max-width: 620px; margin: 0 auto; }
.form-card h1 { margin-top: 0; font-size: clamp(1.8rem, 5vw, 2.7rem); }
.form-card > p { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.field { display: grid; gap: 0.35rem; text-align: left; font-weight: 700; }
.field--wide { grid-column: 1 / -1; }
input, select, button { font: inherit; }
input, select { width: 100%; padding: 0.7rem 0.8rem; border: 1px solid rgba(255,255,255,.5); border-radius: 8px; color: #240b3d; background: white; }
button { cursor: pointer; }
.submit-button { width: 100%; border: 0; }
#ticket { text-align: center; }
#ticket img { display: block; width: min(200px, 100%); height: auto; margin: 1rem auto; border-radius: 8px; background: white; }

@media (max-width: 680px) {
  .content-grid { grid-template-columns: 1fr; }
  .card--wide { grid-column: auto; }
  main { width: min(100% - 1.25rem, 1060px); margin-top: 1rem; }
  .hero { border-radius: 18px; }
  .aftergame-fallback { margin-top: 0 !important; }
  .form-grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
