@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800;900&display=swap");

:root {
  --ink: #0b0b0b;
  --ink-soft: #554d44;
  --paper: #f6e7cf;
  --paper-strong: #f1dcc1;
  --paper-glass: rgba(246, 231, 207, 0.9);
  --line: rgba(11, 11, 11, 0.18);
  --accent: #2f8d5d;
  --accent-soft: #d8472f;
  --accent-alt: #3674c9;
  --button-bg: #0b0b0b;
  --button-alt-bg: #2f8d5d;
  --button-text: #ffffff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
  --radius: 28px;
  --pill: 999px;
}

* {
  box-sizing: border-box;
}


html {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Archivo", "Arial Narrow", Arial, sans-serif;
  color: white;
  background:
    linear-gradient(180deg, rgba(8, 14, 28, 0.84), rgba(8, 14, 28, 0.54)),
    linear-gradient(90deg, rgba(8, 14, 28, 0.34), rgba(8, 14, 28, 0.14)),
    url("https://images.squarespace-cdn.com/content/v1/68077851cd2459106319f003/65cd2214-eb3f-4841-aef3-7f7e71e9898a/DSC03438-min.jpg") center / cover no-repeat fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.06)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 38%);
  pointer-events: none;
}

body::after {
  display: none;
}

.stadium-vibe {
  display: none;
}

.page {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 20px;
}

.hero {
  width: min(calc(100vw - 40px), calc((100vh - 40px) * 16 / 9));
  aspect-ratio: 16 / 9;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  align-items: stretch;
  overflow: hidden;
}

.screen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 0;
}

.screen::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(-0.5px);
}

.intro {
  display: grid;
  align-content: center;
  align-self: stretch;
  min-height: 0;
  max-width: 100%;
  width: 100%;
  padding: 22px 28px 22px 22px;
  border-radius: 8px;
  background: rgba(8, 12, 20, 0.42);
  color: white;
  box-shadow: var(--shadow);
}

.brand {
  display: grid;
  gap: 0;
  align-self: start;
  margin-bottom: 0;
}

.brand::before {
  display: none;
}

.brand span {
  display: inline-flex;
  width: fit-content;
  min-height: 52px;
  align-items: center;
  padding: 0 22px;
  border-radius: 8px;
  color: white;
  font-size: clamp(18px, 1.7vw, 26px);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  background: var(--button-alt-bg);
}

.label {
  margin: 0 0 8px;
  color: var(--accent-soft);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: "Archivo", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(48px, 4.4vw, 72px);
  line-height: 0.95;
}

.rule {
  max-width: 740px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(16px, 1.2vw, 20px);
  font-weight: 700;
}

.match-day {
  display: none;
}

.match {
  margin-top: 16px;
  padding: 14px 18px 14px;
  border-radius: 0;
  border: 0;
  border-left: 8px solid var(--button-alt-bg);
  background:
    linear-gradient(180deg, rgba(121, 131, 149, 0.42), rgba(121, 131, 149, 0.34)),
    rgba(121, 131, 149, 0.32);
}

.match p,
.match span {
  margin: 0;
}

.match p {
  color: white;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}

.teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 12px;
}

.team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.team strong {
  font-size: clamp(20px, 1.8vw, 34px);
  line-height: 1;
}

.versus {
  color: white;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.team-flag {
  width: 40px;
  height: 28px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: linear-gradient(90deg, #d9d9d9, #f5f5f5);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  flex: 0 0 auto;
}

.flag-france {
  background: linear-gradient(90deg, #2753a5 0 33.33%, white 33.33% 66.66%, #e33a47 66.66%);
}

.flag-cote-ivoire {
  background: linear-gradient(90deg, #f08a24 0 33.33%, white 33.33% 66.66%, #2aa54b 66.66%);
}

.flag-irlande-nord {
  background:
    linear-gradient(90deg, #ffffff 0 100%),
    linear-gradient(45deg, transparent 46%, #d72027 46% 54%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, #d72027 46% 54%, transparent 54%);
  background-blend-mode: normal;
}

.flag-senegal {
  background: linear-gradient(90deg, #118c4f 0 33.33%, #f5d24b 33.33% 66.66%, #cf2d37 66.66%);
}

.flag-irak {
  background: linear-gradient(180deg, #cf2d37 0 33.33%, white 33.33% 66.66%, #111111 66.66%);
}

.flag-norvege {
  background:
    linear-gradient(90deg, #ba2f3b 0 100%),
    linear-gradient(90deg, transparent 0 28%, white 28% 38%, #234b9e 38% 44%, white 44% 54%, transparent 54%),
    linear-gradient(180deg, transparent 0 38%, white 38% 48%, #234b9e 48% 54%, white 54% 64%, transparent 64%);
  background-blend-mode: normal;
}

.flag-default {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
}

#matchDetails {
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 700;
}

.card {
  position: relative;
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 12, 20, 0.76);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: white;
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 18px;
  padding: 0 16px;
  color: #111111;
  font: inherit;
  background: white;
}

.score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.score label {
  gap: 10px;
}

.score > span {
  align-self: center;
  padding-bottom: 10px;
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
}

.score input {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
}

button {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 0;
  border-radius: 8px;
  color: var(--button-text);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  background: var(--button-alt-bg);
  cursor: pointer;
}

.message {
  min-height: 24px;
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 700;
}

.message.ok {
  color: var(--accent);
}

.message.error {
  color: #bf2e3a;
}

.qr-panel {
  display: grid;
  gap: 14px;
  align-content: center;
  justify-items: center;
  align-self: stretch;
  width: 100%;
  min-height: 100%;
  padding: 22px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 12, 20, 0.42);
  color: white;
  box-shadow: var(--shadow);
}

.qr-panel img {
  width: min(320px, 100%);
  height: auto;
  border-radius: 0;
  background: white;
  padding: 18px;
}

.qr-panel strong {
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.card.vote-success {
  animation: successPulse 0.8s ease;
}

.confetti-piece {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 50;
  width: 10px;
  height: 18px;
  border-radius: 3px;
  opacity: 1;
  transform: translate(-50%, -50%);
  animation: confettiFly 0.95s ease forwards;
}

@keyframes successPulse {
  0%,
  100% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.015);
  }
}

@keyframes confettiFly {
  to {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r));
  }
}

@media (max-width: 900px) {
  .page {
    padding: 14px;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .hero {
    width: 100%;
    aspect-ratio: auto;
    grid-template-rows: auto auto;
    gap: 14px;
    overflow: visible;
  }

  .screen {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .intro {
    padding: 18px;
  }

  .brand {
    margin-bottom: 14px;
  }

  .brand span {
    min-height: 48px;
    padding: 0 16px;
    font-size: 16px;
  }

  h1 {
    font-size: clamp(34px, 11vw, 52px);
  }

  .rule {
    font-size: 18px;
  }

  .field-grid,
  .score {
    grid-template-columns: 1fr;
  }

  .score > span {
    display: none;
  }

  .qr-panel {
    display: none;
  }
}
