:root {
  --bg: #07152d;
  --bg-deep: #041022;
  --panel: #0b2246;
  --panel-2: #0e2c59;
  --line: rgba(255, 212, 0, 0.3);
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #f6f8fc;
  --muted: rgba(246, 248, 252, 0.72);
  --yellow: #ffd400;
  --yellow-strong: #f5c400;
  --yellow-soft: rgba(255, 212, 0, 0.14);
  --blue: #0d56a6;
  --blue-2: #083f7c;
  --input: rgba(255, 255, 255, 0.05);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  --max-width: 460px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html {
  background-color: var(--bg-deep);
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 212, 0, 0.15), transparent 28%),
    linear-gradient(180deg, #0b2b57 0%, #07152d 42%, #041022 100%);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 18px 14px 26px;
}

.app {
  position: relative;
  width: min(100%, var(--max-width));
  z-index: 2;
}

.bg-grid,
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 100%);
}

.bg-glow {
  filter: blur(70px);
  opacity: 0.8;
}

.glow-1 {
  top: -80px;
  left: -80px;
  width: 220px;
  height: 220px;
  background: rgba(255, 212, 0, 0.18);
}

.glow-2 {
  top: 170px;
  right: -90px;
  width: 220px;
  height: 220px;
  background: rgba(13, 86, 166, 0.28);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-top: 4px;
}

.line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 212, 0, 0.2) 18%,
    rgba(255, 212, 0, 0.75) 50%,
    rgba(255, 212, 0, 0.2) 82%,
    transparent 100%
  );
}

.brand-logo {
  width: 150px;
  max-width: 58%;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(255, 212, 0, 0.14));
}

.hero {
  text-align: center;
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--yellow);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 9vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 900;
  text-transform: uppercase;
}

.highlight {
  color: var(--yellow);
  position: relative;
  display: inline-block;
}

.hero-subtext {
  width: min(100%, 32ch);
  margin: 14px auto 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.98rem;
}

.hero-divider,
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.hero-divider {
  margin-top: 20px;
}

.hero-divider span,
.section-divider span {
  flex: 1;
  max-width: 92px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 212, 0, 0.7) 50%,
    transparent 100%
  );
}

.hero-divider p,
.section-divider p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.prediction-block {
  padding: 0px 0 10px;
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.status-row {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 212, 0, 0.4);
  background: rgba(255, 212, 0, 0.08);
  color: var(--yellow);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.match-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 16px;
}

.team-column {
  display: grid;
  grid-row: 1 / span 2;
  grid-template-rows: subgrid;
  justify-items: center;
  gap: 30px;
}

.team-column:first-child { grid-column: 1; }
.team-column:last-child { grid-column: 3; }

.team {
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.team-logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
}

.team-name {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.teams-center-mark {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  align-self: center;
  padding-top: 150px;
}

.vs-badge {
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: #082f61;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  box-shadow: 0 10px 24px rgba(255, 212, 0, 0.18);
}

.score-controls {
  display: grid;
  justify-items: center;
  gap: 14px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.score-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 212, 0, 0.4);
  background: rgba(255, 212, 0, 0.06);
  color: var(--yellow);
  font-size: 1.45rem;
  font-weight: 900;
  display: grid;
  place-items: center;
}

.score-btn:hover,
.score-btn:focus {
  background: rgba(255, 212, 0, 0.08);
  border-color: rgba(255, 212, 0, 0.55);
  transform: translateY(-1px);
}

.score-value {
  min-width: 60px;
  text-align: center;
  font-size: clamp(4.2rem, 15vw, 6.5rem);
  line-height: 1;
  font-weight: 900;
  color: var(--text);
}

.odds-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 212, 0, 0.28);
  background: rgba(255, 212, 0, 0.07);
}

.odds-selection {
  display: grid;
  gap: 4px;
  text-align: left;
}

.odds-label {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.odds-selection strong {
  color: var(--text);
  font-size: 1.1rem;
}

.odds-value-wrap {
  text-align: right;
}

.odds-selection .odds-value {
  color: var(--yellow);
  font-size: 1.35rem;
  line-height: 1;
}

.prediction-summary {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.prediction-summary strong {
  color: var(--yellow);
}

.entry {
  text-align: center;
  margin-bottom: 30px;
}

.section-divider {
  margin-bottom: 18px;
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: 1.8rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.section-head p {
  width: min(100%, 34ch);
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.96rem;
}

.form {
  display: grid;
  gap: 14px;
  text-align: left;
}

.form-status {
  margin: 0;
  color: var(--yellow);
  font-size: 0.9rem;
  line-height: 1.45;
}

.form-status:empty {
  display: none;
}

.submit-btn:disabled {
  cursor: wait;
  opacity: 0.6;
}

.field-grid .field {
  min-width: 0;
  flex: 1;
}

.field-grid {
  display: flex;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--yellow);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.field input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--input);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input::placeholder {
  color: rgba(246, 248, 252, 0.6);
}

.field input:focus {
  border-color: rgba(255, 212, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  margin-top: 2px;
}

.consent-row a {
  color: var(--yellow);
  text-decoration: underline;
}

.consent-row input {
  margin-top: 3px;
  accent-color: var(--yellow);
}

.submit-btn {
  min-height: 58px;
  border: 1px solid rgba(255, 212, 0, 0.5);
  background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-strong) 100%);
  color: #082f61;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0px 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow: 0 14px 30px rgba(255, 212, 0, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.submit-btn:hover,
.submit-btn:focus {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(255, 212, 0, 0.22);
}

.submit-btn svg {
  width: 20px;
  height: 20px;
}

.bet-btn {
  position: relative;
  width: 100%;
  min-height: 58px;
  margin-top: 18px;
  padding: 0 18px;
  border: 1px solid var(--yellow);
  background: linear-gradient(135deg, #0d56a6 0%, #083f7c 100%);
  color: var(--yellow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow:
    0 0 16px rgba(255, 212, 0, 0.34),
    0 12px 34px rgba(13, 86, 166, 0.55);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: bet-button-glow 2.2s ease-in-out infinite;
}

.bet-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.2) 48%, transparent 70%);
  transform: translateX(-120%);
  animation: bet-button-shine 3.4s ease-in-out infinite;
}

.bet-btn span {
  position: relative;
  z-index: 1;
}

.bet-btn-logo {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 34px;
  flex: 0 0 96px;
  border-radius: 4px;
  object-fit: contain;
  box-shadow: 0 0 12px rgba(255, 212, 0, 0.42);
}

.bet-btn:hover,
.bet-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 0 24px rgba(255, 212, 0, 0.52),
    0 16px 40px rgba(13, 86, 166, 0.65);
}

@keyframes bet-button-glow {
  0%,
  100% {
    box-shadow: 0 0 14px rgba(255, 212, 0, 0.28), 0 12px 34px rgba(13, 86, 166, 0.48);
  }

  50% {
    box-shadow: 0 0 24px rgba(255, 212, 0, 0.48), 0 14px 38px rgba(13, 86, 166, 0.62);
  }
}

@keyframes bet-button-shine {
  0%,
  55% {
    transform: translateX(-120%);
  }

  85%,
  100% {
    transform: translateX(120%);
  }
}

.success-message {
  display: none;
  text-align: center;
  padding: 0px 14px 4px;
}

.success-message h2 {
  margin: 0;
  color: var(--text);
  font-size: 2rem;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.form-submitted .score-btn,
.form-submitted .field,
.form-submitted .consent-row,
.form-submitted .submit-btn {
  display: none;
}

.form-submitted .bet-btn {
  min-height: 64px;
  margin-top: 24px;
}

@media (prefers-reduced-motion: reduce) {
  .bet-btn,
  .bet-btn::before {
    animation: none;
  }
}

.form-submitted .section-divider {
  display: none;
}

.form-submitted .score-controls {
  gap: 0;
}

.form-submitted .form {
  gap: 0;
}

.form-submitted .success-message {
  display: block;
}

.footer {
  padding-top: 6px;
  text-align: center;
}

.footer-line {
  width: 100%;
  height: 1px;
  margin-bottom: 16px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 212, 0, 0.5) 50%,
    transparent 100%
  );
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 10px;
}

.footer-links a,
.footer p {
  color: rgba(246, 248, 252, 0.56);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
}

@media (min-width: 420px) {
  .team-logo {
    width: 112px;
    height: 112px;
  }
}

@media (max-width: 360px) {
  .brand-logo {
    max-width: 64%;
  }

  .match-layout {
    gap: 10px;
  }

  .team-logo {
    width: 90px;
    height: 90px;
  }

  .score-value {
    font-size: 2.4rem;
  }

  .field-grid {
    flex-direction: column;
  }
}

/* Constrain grid items so native mobile controls cannot widen the page. */
html { overflow-x: clip; }
.app, .form, .field, .field-grid, .team-column { min-width: 0; }
.field { grid-template-columns: minmax(0, 1fr); }
.field input { min-width: 0; max-width: 100%; font-size: 16px; }
.consent-row span { min-width: 0; overflow-wrap: anywhere; }

/* Keep the native date picker; render its empty/value display consistently on iOS. */
.field .date-control {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 56px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--input);
}
.field .date-control:focus-within {
  border-color: rgba(255, 212, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.1);
}
.field .date-control input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.date-control input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
.field .date-display {
  min-width: 0;
  color: rgba(246, 248, 252, 0.6);
  font-size: 16px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  pointer-events: none;
}
.field .date-display.has-value { color: var(--text); }
.date-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-left: auto;
  color: var(--yellow);
  pointer-events: none;
}
.organizer-link {
  display: block;
  width: 160px;
  max-width: 60%;
  margin: 26px auto 0;
}
.organizer-link:focus-visible { outline: 2px solid var(--yellow); outline-offset: 6px; }
.organizer-logo { display: block; width: 100%; height: auto; }
