:root {
  --bg-dark: #070724;
  --bg-blue: #101970;
  --euro-purple: #5b2cff;
  --euro-pink: #ff2daa;
  --euro-magenta: #d61f8c;
  --euro-cyan: #35d4ff;
  --text-white: #ffffff;
  --text-muted: #b8b8d8;
  --gold: #ffd84d;
  --green: #3cffb0;
  --danger: #ff5e7a;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --line: rgba(255, 255, 255, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text-white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(53, 212, 255, 0.18), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(255, 45, 170, 0.18), transparent 30%),
    linear-gradient(135deg, #070724 0%, #11145b 42%, #250b4f 100%);
}

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

button,
input,
select {
  font: inherit;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 30px rgba(255, 45, 170, 0.14);
}

.brand-mark span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--euro-pink);
  border-radius: 50%;
  background: rgba(255, 45, 170, 0.14);
}

.brand-mark--small {
  align-self: start;
}

.brand-mark--display {
  padding: 8px 12px;
  background: rgba(7, 7, 36, 0.42);
}

.display-logo {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
}

.display-logo img {
  display: block;
  width: 68px;
  height: 68px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 0 18px rgba(255, 45, 170, 0.28));
}

.home-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 36px;
  overflow: hidden;
}

.home-screen::before,
.home-screen::after {
  position: absolute;
  content: "";
  width: 70vw;
  height: 70vw;
  border: 2px solid rgba(255, 45, 170, 0.2);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.home-screen::before {
  top: -34vw;
  right: -12vw;
  box-shadow: 0 0 60px rgba(53, 212, 255, 0.18);
}

.home-screen::after {
  bottom: -42vw;
  left: -20vw;
  border-color: rgba(53, 212, 255, 0.18);
}

.home-screen > .brand-mark {
  position: absolute;
  top: 28px;
  left: 28px;
}

.home-hero {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  text-align: center;
}

.home-hero h1 {
  max-width: 900px;
  margin: 0 auto;
  font-size: clamp(44px, 8vw, 92px);
  line-height: 0.98;
}

.home-hero__lead {
  max-width: 640px;
  margin: 22px auto 34px;
  color: var(--text-muted);
  font-size: 18px;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mode-button {
  display: grid;
  min-height: 150px;
  align-content: end;
  padding: 22px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.mode-button:hover {
  transform: translateY(-4px);
  border-color: rgba(53, 212, 255, 0.72);
  background: linear-gradient(160deg, rgba(53, 212, 255, 0.2), rgba(255, 45, 170, 0.09));
}

.mode-button span {
  font-size: 24px;
  font-weight: 850;
}

.mode-button em {
  margin-top: 8px;
  color: var(--text-muted);
  font-style: normal;
  line-height: 1.45;
}

.admin-page,
.scoreboard-page {
  padding: 26px;
}

.admin-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  width: min(1500px, 100%);
  margin: 0 auto 22px;
}

.admin-header h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
}

.back-link {
  padding: 10px 12px;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  width: min(1500px, 100%);
  margin: 0 auto;
}

.panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 7, 36, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel--wide {
  grid-column: 1 / -1;
}

.panel__head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel h2,
.panel h3 {
  margin: 0 0 8px;
}

.panel p {
  margin: 0;
  color: var(--text-muted);
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  color: var(--text-white);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(53, 212, 255, 0.7);
  background: rgba(53, 212, 255, 0.15);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button--primary {
  border-color: rgba(255, 216, 77, 0.52);
  background: linear-gradient(135deg, rgba(255, 216, 77, 0.95), rgba(255, 45, 170, 0.86));
  color: #16051d;
  font-weight: 850;
}

.button--accent {
  border-color: rgba(53, 212, 255, 0.62);
  background: linear-gradient(135deg, rgba(53, 212, 255, 0.9), rgba(91, 44, 255, 0.72));
  color: #031020;
  font-weight: 850;
}

.button--danger {
  border-color: rgba(255, 94, 122, 0.62);
  background: rgba(255, 94, 122, 0.12);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.04);
}

.button--small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.toolbar,
.stacked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toolbar--center {
  justify-content: center;
  margin: 18px 0;
}

.server-strip {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(53, 212, 255, 0.22);
  border-radius: 12px;
  background: rgba(53, 212, 255, 0.08);
}

.server-strip strong,
.server-strip span {
  display: block;
}

.server-strip span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 13px;
}

.stacked-actions {
  flex-direction: column;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.stat-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
}

.stat-card span {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
}

.status-message {
  min-height: 22px;
  margin: 10px 0;
  color: var(--text-muted);
}

.status-message.success {
  color: var(--green);
}

.status-message.error,
.error-line {
  color: #ffd1dc;
}

.status-message.info {
  color: var(--euro-cyan);
}

.error-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.error-line,
.empty-state {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.empty-state {
  color: var(--text-muted);
}

.search-input,
.top5-grid select,
.language-select {
  min-height: 40px;
  padding: 9px 12px;
  color: var(--text-white);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 7, 36, 0.72);
}

.preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.preview-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.preview-row__head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.preview-row__head span {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.preview-row__points {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.point-chip {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 6px 8px;
  color: #f8f9ff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
}

.top5-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.top5-grid label {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.mini-score-list {
  display: grid;
  gap: 8px;
}

.mini-score-row {
  display: grid;
  grid-template-columns: 36px 1fr 48px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
}

.mini-score-row span {
  color: var(--gold);
  font-weight: 850;
}

.mini-score-row em {
  justify-self: end;
  color: var(--euro-cyan);
  font-style: normal;
  font-weight: 850;
}

.winner-strip {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid rgba(255, 216, 77, 0.35);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 216, 77, 0.18), rgba(255, 45, 170, 0.12));
}

.winner-strip span {
  color: var(--gold);
  font-weight: 850;
  text-transform: uppercase;
}

.winner-strip strong {
  font-size: 24px;
}

.winner-strip em {
  color: var(--euro-cyan);
  font-style: normal;
  font-weight: 850;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.display-page {
  height: 100vh;
  overflow: hidden;
  background: #05051a;
}

.broadcast-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 25% 20%, rgba(53, 212, 255, 0.18), transparent 24%),
    radial-gradient(circle at 75% 8%, rgba(255, 216, 77, 0.11), transparent 18%),
    linear-gradient(135deg, #05051a 0%, #101970 45%, #2a0a58 100%);
}

.broadcast-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 90px 90px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent);
}

.light-arc {
  position: absolute;
  width: 68vw;
  height: 68vw;
  border: 3px solid transparent;
  border-top-color: rgba(255, 45, 170, 0.38);
  border-right-color: rgba(53, 212, 255, 0.28);
  border-radius: 50%;
  filter: drop-shadow(0 0 25px rgba(255, 45, 170, 0.45));
}

.light-arc--one {
  top: -38vw;
  right: -14vw;
  transform: rotate(18deg);
}

.light-arc--two {
  bottom: -44vw;
  left: -20vw;
  transform: rotate(-22deg);
}

.light-beam {
  position: absolute;
  width: 45vw;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(53, 212, 255, 0.52), transparent);
  filter: blur(1px);
}

.light-beam--one {
  top: 22%;
  left: 28%;
  transform: rotate(-18deg);
}

.light-beam--two {
  bottom: 18%;
  right: 6%;
  transform: rotate(14deg);
}

.display-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 76px 1fr;
  height: 100vh;
  padding: 18px 22px 18px;
}

.display-header {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 18px;
  align-items: center;
}

.display-title {
  display: grid;
  gap: 4px;
}

.display-title span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.display-title strong {
  font-size: 22px;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--euro-cyan), var(--gold), var(--euro-pink));
  transition: width 320ms ease;
}

.scoreboard-stage {
  display: grid;
  grid-template-columns: minmax(760px, 1fr) minmax(330px, 31vw);
  gap: 18px;
  min-height: 0;
}

.country-board {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(13, minmax(0, 1fr));
  grid-auto-columns: minmax(0, 1fr);
  gap: 7px 10px;
  min-height: 0;
  align-content: stretch;
}

.scoreboard-row {
  display: grid;
  grid-template-columns: 42px 42px minmax(0, 1fr) 42px 60px;
  gap: 8px;
  align-items: center;
  min-height: 0;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  will-change: transform;
}

.scoreboard-row--leader {
  border-color: rgba(255, 216, 77, 0.58);
  background: linear-gradient(90deg, rgba(255, 216, 77, 0.22), rgba(255, 255, 255, 0.08));
}

.scoreboard-row--highlight {
  animation: rowPulse 1600ms ease;
  border-color: rgba(53, 212, 255, 0.85);
  box-shadow: 0 0 28px rgba(53, 212, 255, 0.32), 0 0 40px rgba(255, 45, 170, 0.16);
}

.scoreboard-row__place {
  color: var(--gold);
  font-size: clamp(14px, 1.4vw, 20px);
  font-weight: 900;
}

.flag-heart {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50% 50% 46% 46%;
  background: rgba(255, 45, 170, 0.12);
}

.flag-heart span {
  font-size: 21px;
}

.country-flag {
  display: block;
  width: 26px;
  height: 18px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.inline-flag {
  display: inline-block;
  width: 25px;
  height: 17px;
  margin-right: 8px;
  vertical-align: -2px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.flag-fallback {
  color: var(--euro-pink);
  font-size: 20px;
}

.scoreboard-row__country {
  overflow: hidden;
  font-size: clamp(14px, 1.15vw, 20px);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scoreboard-row__points {
  justify-self: end;
  color: #ffffff;
  font-size: clamp(18px, 1.8vw, 30px);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px rgba(53, 212, 255, 0.28);
}

.place-change {
  display: inline-flex;
  justify-content: center;
  width: 38px;
  font-size: 12px;
  font-weight: 900;
}

.place-change--up {
  color: var(--green);
}

.place-change--down {
  color: var(--danger);
}

.reveal-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  min-height: 0;
}

.voter-card,
.reveal-stage {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(7, 7, 36, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.voter-card {
  padding: 18px;
}

.voter-card span {
  display: block;
  color: var(--euro-cyan);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.voter-card strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 8px;
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1;
}

.reveal-stage {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  padding: 20px;
}

.reveal-stage::before {
  position: absolute;
  inset: 12%;
  content: "";
  border: 1px solid rgba(255, 45, 170, 0.22);
  border-radius: 50%;
  filter: blur(1px);
  transform: rotate(-18deg);
}

.stage-empty {
  position: relative;
  z-index: 1;
  max-width: 360px;
  color: var(--text-muted);
  text-align: center;
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 850;
}

.small-points-card {
  position: relative;
  z-index: 1;
  width: 100%;
}

.stage-kicker {
  margin-bottom: 16px;
  color: var(--gold);
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.small-points-list {
  display: grid;
  gap: 8px;
}

.small-point-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  opacity: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
  animation: pointIn 650ms ease forwards;
  animation-delay: var(--delay);
}

.small-point-item span {
  color: var(--euro-cyan);
  font-size: 22px;
  font-weight: 950;
}

.small-point-item strong {
  overflow: hidden;
  font-size: clamp(17px, 1.6vw, 25px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.big-reveal {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  text-align: center;
  animation: revealFlash 1400ms ease;
}

.big-reveal__points {
  color: var(--gold);
  font-size: clamp(78px, 10vw, 150px);
  font-weight: 1000;
  line-height: 0.88;
  text-shadow: 0 0 35px rgba(255, 216, 77, 0.45);
}

.big-reveal__label {
  margin-top: 10px;
  color: var(--euro-cyan);
  font-size: clamp(18px, 2.1vw, 32px);
  font-weight: 950;
  text-transform: uppercase;
}

.big-reveal__heart {
  display: grid;
  width: clamp(112px, 13vw, 210px);
  aspect-ratio: 16 / 10;
  place-items: center;
  margin-top: 24px;
  filter: drop-shadow(0 0 24px rgba(255, 45, 170, 0.54));
}

.reveal-flag {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  box-shadow: 0 0 35px rgba(53, 212, 255, 0.2);
}

.big-reveal__country {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 80px);
  font-weight: 1000;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(53, 212, 255, 0.34);
}

.big-reveal--twelve .big-reveal__points,
.big-reveal--twelve .big-reveal__country {
  text-shadow: 0 0 44px rgba(255, 216, 77, 0.62), 0 0 70px rgba(255, 45, 170, 0.35);
}

.winner-screen {
  position: fixed;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 5vh 6vw;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 216, 77, 0.26), transparent 26%),
    radial-gradient(circle at 22% 20%, rgba(53, 212, 255, 0.25), transparent 22%),
    linear-gradient(135deg, rgba(7, 7, 36, 0.97), rgba(36, 8, 82, 0.98));
}

.winner-screen.is-hidden {
  display: none;
}

.winner-card {
  position: relative;
  z-index: 2;
  text-align: center;
}

.winner-card__brand,
.winner-card__label {
  color: var(--euro-cyan);
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 900;
  text-transform: uppercase;
}

.winner-card__label {
  margin-top: 10px;
  color: var(--gold);
}

.winner-card__heart {
  margin: 22px 0 6px;
  filter: drop-shadow(0 0 35px rgba(255, 45, 170, 0.58));
  animation: heartBeat 1700ms ease infinite;
}

.winner-flag {
  display: block;
  width: clamp(150px, 18vw, 300px);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.62);
  border-radius: 16px;
  box-shadow: 0 0 60px rgba(255, 216, 77, 0.24);
}

.winner-card h1 {
  margin: 0;
  font-size: clamp(72px, 12vw, 180px);
  line-height: 0.92;
  text-transform: uppercase;
}

.winner-card p {
  margin: 16px 0 0;
  color: var(--gold);
  font-size: clamp(34px, 5vw, 76px);
  font-weight: 950;
}

.top-three {
  position: absolute;
  right: 5vw;
  bottom: 5vh;
  left: 5vw;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.top-three__item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.top-three__item span {
  color: var(--gold);
  font-size: 28px;
  font-weight: 950;
}

.top-three__item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-three__item em {
  color: var(--euro-cyan);
  font-style: normal;
  font-weight: 950;
}

.confetti {
  position: absolute;
  inset: -20%;
  opacity: 0.65;
  background-image:
    radial-gradient(circle, var(--gold) 0 3px, transparent 4px),
    radial-gradient(circle, var(--euro-cyan) 0 2px, transparent 3px),
    radial-gradient(circle, var(--euro-pink) 0 3px, transparent 4px);
  background-position: 0 0, 50px 80px, 120px 30px;
  background-size: 170px 190px, 150px 170px, 210px 180px;
  animation: confettiFall 12s linear infinite;
}

.display-controls {
  position: fixed;
  z-index: 10;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100vw - 36px);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 7, 36, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.display-controls--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
}

.start-screen {
  position: fixed;
  z-index: 6;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 3vh;
  align-items: center;
  justify-items: center;
  padding: 6vh 6vw;
  background:
    radial-gradient(circle at 22% 20%, rgba(53, 212, 255, 0.22), transparent 24%),
    radial-gradient(circle at 78% 24%, rgba(255, 45, 170, 0.22), transparent 26%),
    linear-gradient(135deg, rgba(7, 7, 36, 0.96), rgba(18, 25, 112, 0.96), rgba(42, 10, 88, 0.96));
}

.start-screen.is-hidden {
  display: none;
}

.start-screen__brand {
  display: flex;
  gap: 18px;
  align-items: center;
}

.start-screen__brand img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 50%;
}

.start-screen__brand strong,
.start-screen__brand span {
  display: block;
}

.start-screen__brand strong {
  font-size: clamp(42px, 6vw, 88px);
  line-height: 0.95;
}

.start-screen__brand span {
  margin-top: 8px;
  color: var(--euro-cyan);
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 900;
  text-transform: uppercase;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 34vw));
  gap: 34px;
}

.qr-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.qr-card img {
  width: min(290px, 28vw);
  aspect-ratio: 1;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
}

.qr-card strong {
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1;
}

.qr-card span,
.start-screen p {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(17px, 2vw, 28px);
  font-weight: 800;
}

.mobile-form-page {
  min-height: 100vh;
  padding: 14px;
  color: #070724;
  background: linear-gradient(135deg, #e7ecff 0%, #ffffff 42%, #ffe4f3 100%);
}

.paper-form {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 18px;
  overflow: hidden;
  border: 2px solid rgba(16, 25, 112, 0.45);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(91, 44, 255, 0.2), transparent 24%),
    radial-gradient(circle at 100% 100%, rgba(255, 45, 170, 0.2), transparent 28%),
    #ffffff;
  box-shadow: 0 18px 60px rgba(16, 25, 112, 0.18);
}

.paper-form__header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.paper-form__header img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 50%;
}

.paper-form__header strong,
.paper-form__header span {
  display: block;
  font-weight: 950;
  line-height: 1;
}

.paper-form__header strong {
  color: #07105d;
  font-size: clamp(36px, 10vw, 64px);
}

.paper-form__header span {
  margin-top: 6px;
  color: #e91e86;
  font-size: clamp(24px, 7vw, 44px);
}

.mobile-form {
  display: grid;
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 7px;
  color: #07105d;
  font-size: 18px;
  font-weight: 900;
}

.form-field input,
.mobile-country-row select,
.mobile-pick-row select {
  min-height: 48px;
  width: 100%;
  padding: 10px 12px;
  color: #07105d;
  border: 2px solid rgba(16, 25, 112, 0.42);
  border-radius: 12px;
  background: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

.mobile-country-list,
.mobile-picks-list {
  display: grid;
  gap: 9px;
}

.mobile-country-row,
.mobile-pick-row {
  display: grid;
  grid-template-columns: 42px 42px minmax(0, 1fr) 86px;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 8px;
  border: 1px solid rgba(16, 25, 112, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
}

.mobile-pick-row {
  grid-template-columns: 50px 105px minmax(0, 1fr);
}

.mobile-country-row__order,
.mobile-pick-row span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  border-radius: 50%;
  background: linear-gradient(135deg, #244fc6, #e91e86);
  font-size: 20px;
  font-weight: 950;
}

.mobile-country-row__flag {
  display: grid;
  place-items: center;
}

.mobile-country-row__flag .country-flag {
  width: 34px;
  height: 24px;
}

.mobile-country-row strong,
.mobile-pick-row strong {
  overflow: hidden;
  color: #07105d;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paper-rule {
  padding: 16px;
  color: #07105d;
  border: 2px solid rgba(233, 30, 134, 0.46);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.form-submit {
  min-height: 54px;
  font-size: 19px;
}

.form-status {
  min-height: 24px;
  color: #07105d;
  font-size: 16px;
  font-weight: 850;
}

.form-status.success {
  color: #087a49;
}

.form-status.error {
  color: #c2003c;
}

.form-status.info {
  color: #244fc6;
}

.mobile-form.is-submitted .mobile-country-list,
.mobile-form.is-submitted .mobile-picks-list,
.mobile-form.is-submitted .paper-rule,
.mobile-form.is-submitted .form-submit {
  display: none;
}

.scoreboard-results {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.winner-block {
  display: grid;
  justify-items: center;
  padding: 34px;
  text-align: center;
  border: 1px solid rgba(255, 216, 77, 0.4);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 216, 77, 0.22), transparent 30%),
    rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.winner-block span {
  color: var(--gold);
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}

.winner-block div {
  margin-top: 10px;
  font-size: 74px;
}

.winner-block-flag {
  display: block;
  width: min(280px, 42vw);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  box-shadow: 0 0 46px rgba(255, 216, 77, 0.18);
}

.winner-block strong {
  margin-top: 8px;
  font-size: clamp(46px, 8vw, 96px);
  line-height: 1;
  text-transform: uppercase;
}

.winner-block em {
  margin-top: 10px;
  color: var(--euro-cyan);
  font-size: 34px;
  font-style: normal;
  font-weight: 900;
}

.results-table {
  display: grid;
  gap: 8px;
}

.result-row {
  display: grid;
  grid-template-columns: 60px 1fr 90px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
}

.result-row--winner {
  border-color: rgba(255, 216, 77, 0.48);
  background: rgba(255, 216, 77, 0.14);
}

.result-row span {
  color: var(--gold);
  font-size: 22px;
  font-weight: 950;
}

.result-row strong {
  font-size: 22px;
}

.result-row em {
  justify-self: end;
  color: var(--euro-cyan);
  font-size: 26px;
  font-style: normal;
  font-weight: 950;
}

@keyframes rowPulse {
  0% {
    transform: scale(1);
  }
  32% {
    transform: scale(1.025);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pointIn {
  from {
    opacity: 0;
    transform: translateX(22px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes revealFlash {
  0% {
    opacity: 0;
    transform: scale(0.9);
    filter: brightness(1.8);
  }
  42% {
    opacity: 1;
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes heartBeat {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.08);
  }
}

@keyframes confettiFall {
  from {
    transform: translateY(-8%);
  }
  to {
    transform: translateY(8%);
  }
}

@media (max-width: 1100px) {
  .mode-grid,
  .admin-layout,
  .top5-grid {
    grid-template-columns: 1fr;
  }

  .admin-header {
    grid-template-columns: 1fr;
  }

  .scoreboard-stage {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .country-board {
    grid-template-rows: repeat(13, minmax(34px, 1fr));
  }

  .server-strip {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .admin-page,
  .scoreboard-page {
    padding: 16px;
  }

  .stats-grid,
  .top-three {
    grid-template-columns: 1fr;
  }

  .panel__head {
    flex-direction: column;
  }

  .preview-list {
    grid-template-columns: 1fr;
  }

  .qr-grid {
    grid-template-columns: 1fr;
  }

  .qr-card img {
    width: min(260px, 72vw);
  }

  .mobile-country-row {
    grid-template-columns: 38px 38px minmax(0, 1fr) 76px;
    gap: 8px;
  }

  .mobile-pick-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .mobile-pick-row select {
    grid-column: 1 / -1;
  }
}
