body {
  margin: 0;
  font-family: "Rajdhani", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 20%, rgba(34, 197, 94, 0.22), transparent 24%),
    radial-gradient(circle at 92% 16%, rgba(59, 130, 246, 0.20), transparent 26%),
    radial-gradient(circle at 10% 80%, rgba(250, 204, 21, 0.18), transparent 22%),
    radial-gradient(circle at 90% 82%, rgba(239, 68, 68, 0.16), transparent 24%),
    linear-gradient(135deg, #06131f 0%, #0f172a 45%, #111827 100%);
  background-attachment: fixed;
  color: #e5e7eb;
}

body::before,
body::after {
  content: "⚽";
  position: fixed;
  top: 18%;
  font-size: 160px;
  opacity: 0.055;
  pointer-events: none;
  z-index: -1;
}

body::before {
  left: 3%;
}

body::after {
  right: 3%;
  top: 55%;
}

.usa-celebration {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 22px 18px 24px;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.34), transparent 9%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.24), transparent 10%),
    linear-gradient(135deg, #1d4ed8 0%, #f8fafc 48%, #b91c1c 100%);
  color: #082f49;
  border-bottom: 3px solid rgba(185, 28, 28, 0.72);
}

.usa-celebration h2 {
  position: relative;
  margin: 6px 0 4px;
  color: #0f172a;
  font-size: clamp(28px, 4.5vw, 48px);
  line-height: 1;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.55);
}

.usa-celebration p {
  position: relative;
  max-width: 860px;
  margin: 8px auto 0;
  color: #172554;
  font-size: 18px;
  font-weight: 700;
}

.usa-stars {
  position: relative;
  color: #1d4ed8;
  letter-spacing: 10px;
  font-size: 18px;
  animation: starPulse 2.4s ease-in-out infinite;
}

.usa-firework {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 4px, transparent 5px),
    conic-gradient(from 0deg, transparent 0 12deg, rgba(239, 68, 68, 0.82) 12deg 18deg, transparent 18deg 42deg, rgba(37, 99, 235, 0.82) 42deg 48deg, transparent 48deg 72deg, rgba(255, 255, 255, 0.88) 72deg 78deg, transparent 78deg 360deg);
  opacity: 0.75;
  animation: fireworkPop 1.9s ease-in-out infinite;
}

.usa-firework-left {
  left: 8%;
  top: 18px;
}

.usa-firework-right {
  right: 8%;
  top: 18px;
  animation-delay: 0.85s;
}

@keyframes fireworkPop {
  0%, 100% {
    transform: scale(0.72) rotate(0deg);
    opacity: 0.25;
  }
  50% {
    transform: scale(1.06) rotate(18deg);
    opacity: 0.82;
  }
}

@keyframes starPulse {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.74;
  }
  50% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

.hero {
  padding: 56px 18px 44px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.24), transparent 34%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.hero-badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #f8fafc;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
  max-width: 760px;
  margin: 18px auto 0;
  color: #cbd5e1;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 500;
  line-height: 1.25;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  border-radius: 20px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.card {
  background: #111827;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}

.card span {
  display: block;
  font-size: 30px;
  font-weight: 800;
}

.card label {
  color: #94a3b8;
}

h2 {
  margin-top: 30px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #111827;
  border: 1px solid #334155;
  border-radius: 14px;
  overflow: hidden;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid #334155;
  text-align: left;
}

th {
  background: #1f2937;
  color: #f8fafc;
}

tr:last-child td {
  border-bottom: none;
}

footer {
  text-align: center;
  color: #94a3b8;
  padding: 24px;
}

#loginBtn,
#logoutBtn {
  background: white;
  color: #111827;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin: 8px;
}

#loginBtn:hover,
#logoutBtn:hover {
  background: #f3f4f6;
}

#userInfo {
  color: #e5e7eb;
  font-size: 16px;
  margin-top: 8px;
}

.profile-settings-header {
  margin-top: 16px;
}

.profile-settings-header h2 {
  font-size: 22px;
  margin: 0;
}

#profileSettingsContent {
  text-align: left;
}

#groupPicksForm,
#round32PicksForm,
#round32BonusForm,
#round16PicksForm,
#round16BonusForm,
#rootingForForm,
#adminGroupResultsForm,
#adminRound32ResultsForm,
#adminRound32BonusResultsForm,
#adminRound16ResultsForm,
#adminSemifinalResultsForm,
#adminSemifinalBonusResultsForm,
#adminFinalsResultsForm,
#adminFinalsBonusResultsForm,
#matchPicksForm,
#adminMatchResultsForm {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.finals-answer-key-box {
  grid-column: 1 / -1;
}

#quarterfinalPicksForm,
#quarterfinalBonusForm,
#semifinalPicksForm,
#semifinalBonusForm,
#finalsPicksForm,
#finalsBonusForm {
  display: grid;
  gap: 14px;
}

#quarterfinalPicksForm,
#semifinalPicksForm,
#finalsPicksForm {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#quarterfinalBonusForm {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#semifinalBonusForm {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

#finalsBonusForm {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.semifinal-bonus-card {
  grid-column: span 2;
}

.finals-bonus-card {
  grid-column: span 2;
}

.finals-survey-card {
  grid-column: 1 / -1;
}

.semifinal-bonus-top-one {
  grid-column: 2 / span 2;
}

.semifinal-bonus-top-two {
  grid-column: 4 / span 2;
}

.semifinal-rooting-card {
  grid-column: 2 / span 4;
  text-align: center;
}

.quarterfinal-bonus-instructions {
  grid-column: 1 / -1;
  color: #dbeafe;
  font-size: 15px;
  font-weight: 700;
  margin: 4px 0 18px;
  text-align: center;
}

.finals-bonus-instructions {
  color: #dbeafe;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin: 6px 0 14px;
  text-align: center;
}

.semifinal-bonus-note {
  border: 1px solid rgba(59, 130, 246, 0.34);
  border-radius: 10px;
  background: rgba(30, 64, 175, 0.18);
  color: #dbeafe;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  margin: 10px 0 12px;
  padding: 10px 12px;
  text-align: center;
}

#quarterfinalPicksForm .quarterfinal-score-label,
#semifinalPicksForm .quarterfinal-score-label,
#finalsPicksForm .quarterfinal-score-label {
  text-align: center;
}

#quarterfinalPicksForm .score-entry-row,
#semifinalPicksForm .score-entry-row,
#finalsPicksForm .score-entry-row {
  margin-left: auto;
  margin-right: auto;
}

#quarterfinalPicksForm .checkbox-row,
#semifinalPicksForm .checkbox-row,
#finalsPicksForm .checkbox-row {
  justify-content: center;
  text-align: center;
}

.score-rule-callout {
  border: 1px solid rgba(250, 204, 21, 0.48);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.16), rgba(239, 68, 68, 0.10)),
    rgba(120, 53, 15, 0.28);
  color: #fef3c7;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  margin: 10px 0;
  padding: 9px 12px;
  text-align: left;
}

.score-rule-callout strong {
  color: #fde68a;
}

.pickem-note {
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.38;
  margin: 10px 0 14px;
}

.pick-card {
  background: rgba(31, 41, 55, 0.92);
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 16px;
  margin: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.pick-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.mini-note {
  color: #cbd5e1;
  font-size: 13px;
  margin-top: 0;
}

.admin-derived-answer-label {
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 12px 0 0;
  text-transform: uppercase;
}

.answer-result {
  min-height: 20px;
  margin: 8px 0 0;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.answer-result:empty {
  display: none;
}

.answer-result-correct {
  color: #dcfce7;
  border: 1px solid rgba(34, 197, 94, 0.42);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.34), rgba(21, 128, 61, 0.20));
}

.answer-result-partial {
  color: #fef9c3;
  border: 1px solid rgba(234, 179, 8, 0.42);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.34), rgba(202, 138, 4, 0.20));
}

.answer-result-wrong {
  color: #fee2e2;
  border: 1px solid rgba(239, 68, 68, 0.42);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.34), rgba(153, 27, 27, 0.20));
}

.answer-result-pending {
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.36);
}

.admin-semifinal-answer-key-box {
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.62);
  margin-top: 14px;
  padding: 14px;
}

.admin-semifinal-answer-key-box h3 {
  color: #dbeafe;
  margin: 0 0 6px;
}

.admin-final-answer-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.admin-final-answer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 1.2fr);
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.62);
  color: #cbd5e1;
  padding: 9px 10px;
}

.admin-final-answer-row strong {
  color: #bbf7d0;
  overflow-wrap: anywhere;
}

.survey-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 96px);
  gap: 5px;
  justify-content: center;
  margin: 4px 0 8px;
}

.pick-card .survey-option {
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.38);
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
  justify-content: center;
  line-height: 1.1;
  margin: 0;
  min-height: 28px;
  padding: 4px 7px;
  text-align: center;
  width: 96px;
}

.pick-card .survey-option input {
  flex: 0 0 auto;
  margin: 0;
  min-height: 0;
  padding: 0;
  transform: scale(0.82);
  width: auto;
}

.pick-card .survey-option span {
  font-size: 12px;
}

.finals-survey-card textarea {
  background: rgba(30, 41, 59, 0.9);
  box-sizing: border-box;
  color: #f8fafc;
  min-height: 150px;
  resize: vertical;
  width: 100%;
}

.finals-survey-card textarea::placeholder {
  color: #94a3b8;
}

.survey-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.survey-summary-card,
.admin-survey-response {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.54);
  padding: 12px;
}

.survey-summary-card h4,
.admin-survey-response p {
  margin: 6px 0;
}

.survey-bar-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.survey-bar-row {
  display: grid;
  gap: 4px;
}

.survey-bar-meta {
  align-items: center;
  color: #dbeafe;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: space-between;
}

.survey-bar-meta strong {
  color: #f8fafc;
}

.survey-bar-track {
  background: rgba(30, 41, 59, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.survey-bar-fill {
  background: linear-gradient(90deg, #a855f7, #ec4899);
  border-radius: inherit;
  height: 100%;
  min-width: 0;
}

.admin-survey-response-list {
  display: grid;
  gap: 10px;
}

.pick-card select:disabled,
.pick-card input:disabled,
.pick-card textarea:disabled {
  color: #f8fafc;
  opacity: 1;
  border-color: rgba(148, 163, 184, 0.58);
  background:
    linear-gradient(135deg, rgba(71, 85, 105, 0.72), rgba(30, 41, 59, 0.82)),
    #1f2937;
  -webkit-text-fill-color: #f8fafc;
}

.region-guide {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.42);
}

.region-guide p {
  margin: 5px 0;
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.35;
}

.pick-card label {
  display: block;
  margin-top: 10px;
  margin-bottom: 4px;
  color: #cbd5e1;
  font-weight: 700;
}

.pick-card select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #475569;
  font-size: 15px;
}

.pick-card input[type="number"],
.pick-card input[type="text"],
.pick-card textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #475569;
  font-size: 15px;
}

.score-entry-row {
  display: grid;
  grid-template-columns: minmax(54px, 88px) 18px minmax(54px, 88px);
  align-items: center;
  gap: 8px;
  max-width: 210px;
}

.pick-card .score-entry-row .score-number-input {
  width: 100%;
  text-align: center;
  font-weight: 800;
}

.score-entry-dash {
  color: #e5e7eb;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.rooting-for-box {
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  margin-top: 20px;
  padding-top: 18px;
}

.rooting-for-box h3 {
  margin-top: 0;
  margin-bottom: 6px;
  color: #f8fafc;
}

.rooting-for-form {
  margin: 12px 0;
}

.rooting-for-form select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #475569;
  font-size: 15px;
}

.leaderboard-country-heading,
.leaderboard-country-cell {
  width: 92px;
  text-align: right;
  white-space: nowrap;
}

.leaderboard-note {
  max-width: 860px;
  margin: -4px auto 14px;
  color: #cbd5e1;
  text-align: center;
  font-size: 15px;
}

.leaderboard-medal-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 46px;
  font-weight: 900;
}

.leaderboard-medal {
  font-size: 20px;
  line-height: 1;
}

#leaderboard tbody tr.leaderboard-rank-first {
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.20), rgba(168, 85, 247, 0.08));
}

#leaderboard tbody tr.leaderboard-rank-second {
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.16), rgba(59, 130, 246, 0.06));
}

#leaderboard tbody tr.leaderboard-rank-third {
  background: linear-gradient(90deg, rgba(251, 146, 60, 0.15), rgba(168, 85, 247, 0.05));
}

#leaderboard tbody tr.leaderboard-rank-first td:first-child,
#leaderboard tbody tr.leaderboard-rank-second td:first-child,
#leaderboard tbody tr.leaderboard-rank-third td:first-child {
  font-size: 18px;
}

.leaderboard-delta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  padding: 4px 6px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.daily-change-heading,
.daily-change-table-cell {
  width: 118px;
  white-space: nowrap;
}

.daily-change-table-cell {
  padding-left: 8px;
  padding-right: 8px;
}

.daily-change-cell {
  display: grid;
  grid-template-columns: 56px 46px;
  align-items: center;
  justify-content: end;
  gap: 6px;
  width: 108px;
}

.daily-change-points {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  width: 56px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.daily-change-positive {
  color: #bbf7d0;
}

.daily-change-negative {
  color: #fecaca;
}

.daily-change-flat {
  color: #cbd5e1;
}

.leaderboard-delta-up {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.34);
}

.leaderboard-delta-down {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.32);
}

.leaderboard-delta-flat {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.point-delta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
}

.point-delta-up {
  color: #86efac;
}

.point-delta-down {
  color: #fca5a5;
}

.point-delta-flat {
  color: #94a3b8;
}

.rooting-flags {
  display: inline-block;
  font-size: 20px;
  letter-spacing: 2px;
  line-height: 1;
}

.rooting-flags-empty {
  color: #64748b;
}

.announcement-card {
  border-color: rgba(168, 85, 247, 0.78);
  background:
    linear-gradient(135deg, rgba(88, 28, 135, 0.72), rgba(126, 34, 206, 0.48), rgba(192, 132, 252, 0.24)),
    #111827;
  box-shadow: 0 14px 34px rgba(168, 85, 247, 0.20);
}

.announcement-card h2 {
  margin-top: 0;
  color: #f5d0fe;
}

.announcement-card p {
  max-width: 780px;
  margin: 8px auto 0;
  font-size: 19px;
  color: #f8fafc;
}

.semifinal-announcement-card {
  border-color: rgba(20, 184, 166, 0.82);
  background:
    linear-gradient(135deg, rgba(13, 148, 136, 0.74), rgba(8, 145, 178, 0.52), rgba(250, 204, 21, 0.20)),
    #111827;
  box-shadow: 0 14px 34px rgba(20, 184, 166, 0.20);
}

.semifinal-announcement-card h2 {
  color: #ccfbf1;
}

.final-announcement-card {
  border-color: rgba(236, 72, 153, 0.78);
  background:
    linear-gradient(135deg, rgba(88, 28, 135, 0.78), rgba(190, 24, 93, 0.56), rgba(236, 72, 153, 0.30)),
    #111827;
  box-shadow: 0 14px 34px rgba(236, 72, 153, 0.22);
}

.final-announcement-card h2 {
  color: #fce7f3;
}

.congratulations-card p {
  max-width: 860px;
}

.winner-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  max-width: 760px;
  margin: 20px auto 12px;
  padding-top: 18px;
}

.winner-podium-card {
  border: 1px solid rgba(248, 250, 252, 0.18);
  border-radius: 8px 8px 4px 4px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.12), rgba(15, 23, 42, 0.42)),
    rgba(15, 23, 42, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: 14px 10px 16px;
  min-width: 0;
  position: relative;
}

.winner-podium-card::before {
  content: "";
  display: block;
  width: 42px;
  height: 5px;
  border-radius: 999px;
  margin: 0 auto 10px;
  background: rgba(248, 250, 252, 0.42);
}

.winner-podium-first {
  grid-column: 2;
  grid-row: 1;
  min-height: 170px;
  border-color: rgba(250, 204, 21, 0.72);
  background:
    linear-gradient(180deg, rgba(254, 240, 138, 0.42), rgba(202, 138, 4, 0.20), rgba(88, 28, 135, 0.32)),
    rgba(15, 23, 42, 0.50);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 16px 34px rgba(250, 204, 21, 0.18);
}

.winner-podium-first::before {
  background: linear-gradient(90deg, #facc15, #fef3c7, #eab308);
}

.winner-podium-second {
  grid-column: 1;
  grid-row: 1;
  min-height: 132px;
  border-color: rgba(226, 232, 240, 0.56);
  background:
    linear-gradient(180deg, rgba(241, 245, 249, 0.30), rgba(100, 116, 139, 0.16), rgba(15, 23, 42, 0.40)),
    rgba(15, 23, 42, 0.50);
}

.winner-podium-second::before {
  background: linear-gradient(90deg, #94a3b8, #f8fafc, #cbd5e1);
}

.winner-podium-third {
  grid-column: 3;
  grid-row: 1;
  min-height: 104px;
  border-color: rgba(251, 146, 60, 0.56);
  background:
    linear-gradient(180deg, rgba(251, 146, 60, 0.30), rgba(146, 64, 14, 0.16), rgba(15, 23, 42, 0.40)),
    rgba(15, 23, 42, 0.50);
}

.winner-podium-third::before {
  background: linear-gradient(90deg, #b45309, #fed7aa, #c2410c);
}

.winner-podium-rank {
  display: block;
  color: #fbcfe8;
  font-size: 15px;
  font-weight: 800;
}

.winner-podium-name {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.winner-podium-points {
  display: block;
  margin-top: 2px;
  color: #e9d5ff;
  font-size: 15px;
  font-weight: 800;
}

@media (max-width: 680px) {
  .winner-podium {
    grid-template-columns: 1fr;
    padding-top: 0;
  }

  .winner-podium-first,
  .winner-podium-second,
  .winner-podium-third {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
  }
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
}

.admin-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 6px 12px;
  margin-top: 10px;
  text-align: left;
}

.admin-stat-grid {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  text-align: left;
}

.admin-stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 12px;
  align-items: center;
  color: #dbeafe;
  font-weight: 800;
}

.admin-stat-row input {
  margin: 0;
  text-align: center;
}

.status-message {
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
}

.status-success {
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #bbf7d0;
}

.status-info {
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.36);
  color: #bfdbfe;
}

.status-locked {
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: #e5e7eb;
}

.status-error {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.42);
  color: #fecaca;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-header h2 {
  margin: 0;
}

.secondary-btn {
  background: transparent;
  color: #e5e7eb;
  border: 1px solid #475569;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

#saveGroupPicksBtn,
#saveBonusBtn,
#saveRound32PicksBtn,
#saveRound32BonusBtn,
#saveRound16PicksBtn,
#saveRound16BonusBtn,
#saveQuarterfinalPicksBtn,
#saveQuarterfinalBonusBtn,
#saveQuarterfinalBonusResultsBtn,
#saveSemifinalPicksBtn,
#saveSemifinalBonusBtn,
#saveSemifinalResultsBtn,
#saveSemifinalBonusResultsBtn,
#saveFinalsPicksBtn,
#saveFinalsBonusBtn,
#saveFinalsResultsBtn,
#saveFinalsBonusResultsBtn,
#saveMatchPicksBtn,
#saveGroupResultsBtn,
#saveRound32ResultsBtn,
#saveRound32BonusResultsBtn,
#saveRound16ResultsBtn,
#saveQuarterfinalResultsBtn,
#saveMatchResultsBtn,
#resetMatchResultsBtn,
#refreshLeaderboardBtn {
  background: white;
  color: #111827;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 14px;
  margin-right: 8px;
}

#leaderboardSection #refreshLeaderboardBtn {
  margin-bottom: 12px;
}

.refresh-leaderboard-status {
  display: inline-block;
  margin-left: 8px;
  margin-bottom: 12px;
  vertical-align: middle;
}

.floating-leaderboard-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  background: #22c55e;
  color: #052e16;
  border: 2px solid rgba(240, 253, 244, 0.88);
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.floating-leaderboard-btn:hover {
  background: #86efac;
}

.save-toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  z-index: 40;
  transform: translate(-50%, 12px);
  border: 1px solid rgba(34, 197, 94, 0.58);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.40);
  color: #bbf7d0;
  font-size: 16px;
  font-weight: 900;
  opacity: 0;
  padding: 12px 16px;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.save-toast-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.admin-primary-panel {
  border-color: rgba(34, 197, 94, 0.58);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18);
}

#usernameBox {
  margin-top: 14px;
}

#usernameBox label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

#usernameInput {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #475569;
  font-size: 15px;
  max-width: 240px;
}

#saveUsernameBtn {
  background: white;
  color: #111827;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 8px;
}

.lock-note {
  color: #cbd5e1;
  font-size: 13px;
  margin-top: -4px;
}

.yellow-note {
  font-size: inherit;
  font-weight: normal;
  color: inherit;
}

/* Main site button */

.home-link {
  position: fixed;
  top: 15px;
  right: 20px;
  z-index: 9999;
}

.home-link a {
  background: rgba(15, 23, 42, 0.92);
  color: white;
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(6px);
  transition: transform .15s ease;
}

.home-link a:hover {
  transform: translateY(-1px);
}

/* Footer */

.site-footer {
  text-align: center;
  padding: 40px 0;
  color: #94a3b8;
  font-size: 14px;
}

.site-footer a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* World Cup match ticker */

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

.ticker-header h2 {
  margin: 0;
}

#tickerUpdated {
  color: #94a3b8;
  font-size: 13px;
}

.match-ticker {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 6px;
}

.match-card {
  width: clamp(292px, 30vw, 360px);
  min-width: 292px;
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98)),
    #1f2937;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 14px;
  text-align: left;
  flex-shrink: 0;
}

.match-card.live {
  background:
    linear-gradient(145deg, rgba(5, 46, 22, 0.98), rgba(22, 101, 52, 0.72)),
    #052e16;
  border-color: rgba(134, 239, 172, 0.42);
}

.match-card.started {
  background:
    linear-gradient(145deg, rgba(5, 46, 22, 0.98), rgba(21, 83, 45, 0.74)),
    #052e16;
  border-color: rgba(134, 239, 172, 0.38);
}

.match-card.final {
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.72)),
    #0f172a;
  border-color: rgba(96, 165, 250, 0.48);
}

.match-card.scheduled {
  background:
    linear-gradient(145deg, rgba(30, 27, 75, 0.98), rgba(76, 29, 149, 0.72)),
    #1e1b4b;
  border-color: rgba(196, 181, 253, 0.38);
}

.match-card-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.live-pill {
  color: #dcfce7;
  background: rgba(22, 163, 74, 0.28);
  border: 1px solid rgba(187, 247, 208, 0.45);
  border-radius: 999px;
  padding: 2px 8px;
}

.final-pill {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.32);
  border-radius: 999px;
  padding: 2px 8px;
}

.started-pill {
  color: #dcfce7;
  background: rgba(22, 163, 74, 0.24);
  border: 1px solid rgba(187, 247, 208, 0.38);
  border-radius: 999px;
  padding: 2px 8px;
}

.upcoming-pill {
  color: #ede9fe;
  background: rgba(124, 58, 237, 0.22);
  border: 1px solid rgba(221, 214, 254, 0.38);
  border-radius: 999px;
  padding: 2px 8px;
}

.matchup {
  position: relative;
  display: grid;
  grid-template-columns: 32px 42px minmax(0, 1fr) 34px 16px;
  gap: 8px;
  align-items: center;
  font-size: 18px;
  font-weight: 700;
  min-width: 0;
}

.matchup + .matchup {
  margin-top: 8px;
}

.matchup.match-winner {
  color: #bbf7d0;
}

.matchup.match-winner .team-name,
.matchup.match-winner .team-score {
  color: #bbf7d0;
}

.team-winner-mark {
  width: 18px;
  text-align: center;
  color: #22c55e;
  font-size: 18px;
  font-weight: 900;
}

.team-flag {
  font-size: 22px;
  text-align: center;
}

.team-code {
  text-align: left;
  letter-spacing: 0;
}

.team-name {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
}

.team-score {
  text-align: right;
  font-size: 22px;
  color: #f8fafc;
}

.match-footer {
  margin-top: 12px;
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.32;
}

.match-footer-line + .match-footer-line {
  margin-top: 3px;
}

.match-winner-footer {
  color: #bbf7d0;
  font-weight: 800;
}

.admin-panel {
  border-top: 2px solid rgba(148, 163, 184, 0.28);
  margin-top: 26px;
  padding-top: 22px;
  text-align: left;
}

.admin-panel h3 {
  margin-top: 6px;
  margin-bottom: 8px;
  color: #f8fafc;
}

.admin-panel-label {
  display: inline-block;
  color: #fde68a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-player-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid #334155;
  border-radius: 12px;
  overflow: hidden;
}

.admin-player-table th,
.admin-player-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #334155;
  text-align: left;
  vertical-align: middle;
}

.admin-player-table th {
  background: #1f2937;
  color: #f8fafc;
  font-weight: 800;
}

.admin-player-table tr:last-child td {
  border-bottom: none;
}

.admin-player-table td:first-child,
.admin-player-table th:first-child {
  width: 42px;
  text-align: center;
  color: #94a3b8;
}

.admin-bonus-key-card {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(253, 230, 138, 0.34);
  border-radius: 12px;
  margin: 18px 0;
  padding: 16px;
}

.admin-bonus-key-card h3 {
  margin: 4px 0 8px;
}

.admin-bonus-key-table th,
.admin-bonus-key-table td {
  vertical-align: top;
}

.admin-bonus-key-table th:first-child,
.admin-bonus-key-table td:first-child {
  text-align: left;
  width: 240px;
}

.admin-ban-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  font-weight: 700;
}

.admin-ban-cell input {
  width: 16px;
  height: 16px;
}

.status-good {
  color: #bbf7d0;
  font-weight: 800;
}

.status-bad {
  color: #fecaca;
  font-weight: 800;
}

.player-pick-link {
  background: none;
  border: none;
  color: #bfdbfe;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.player-pick-link:hover {
  color: #dbeafe;
}

.public-picks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.player-drawer-section {
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  margin-top: 18px;
  padding-top: 14px;
  text-align: left;
}

.player-drawer-section-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.player-drawer-section-header h3 {
  margin: 0;
}

.public-pick-card {
  background: rgba(31, 41, 55, 0.92);
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 14px;
  text-align: left;
}

.public-pick-card h3 {
  margin-top: 0;
}

.earned-points {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #dbeafe;
  font-size: 14px;
  margin: 10px 0 0;
  padding-top: 8px;
}

.public-pick-hidden {
  border-style: dashed;
  background: rgba(15, 23, 42, 0.76);
}

.hidden-pick-marker {
  display: inline-block;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 10px;
}

.admin-daily-points-panel {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(253, 230, 138, 0.36);
  border-radius: 12px;
  margin-bottom: 18px;
  padding: 16px;
  text-align: left;
}

.admin-daily-points-header {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.admin-daily-points-header h3 {
  margin: 4px 0 0;
}

.admin-date-control {
  align-items: center;
  color: #f8fafc;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
}

.admin-date-control input {
  margin: 0;
  max-width: 160px;
}

.admin-daily-points-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-daily-points-summary span,
.admin-daily-points-summary strong {
  background: rgba(31, 41, 55, 0.9);
  border: 1px solid #334155;
  border-radius: 999px;
  color: #e5e7eb;
  font-size: 1em;
  line-height: inherit;
  padding: 7px 10px;
}

.admin-daily-points-table th:first-child,
.admin-daily-points-table td:first-child {
  text-align: left;
  width: auto;
}

.admin-daily-points-table th:last-child,
.admin-daily-points-table td:last-child {
  text-align: right;
  width: 64px;
}

.daily-points-positive {
  color: #bbf7d0;
  font-weight: 900;
}

.daily-points-negative {
  color: #fecaca;
  font-weight: 900;
}

.user-bonus-key {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  text-align: left;
}

.user-bonus-key summary {
  color: #dbeafe;
  cursor: pointer;
  font-weight: 900;
}

.user-bonus-key table {
  margin-top: 10px;
}

.player-picks-close-divider {
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  margin: 18px 0 14px;
}

#closePlayerPicksBtn {
  background: white;
  color: #111827;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 14px;
}

@media (max-width: 760px) {
  #quarterfinalPicksForm,
  #quarterfinalBonusForm,
  #semifinalPicksForm,
  #semifinalBonusForm,
  #finalsPicksForm,
  #finalsBonusForm {
    grid-template-columns: 1fr;
  }

  .semifinal-bonus-card,
  .semifinal-bonus-top-one,
  .semifinal-bonus-top-two,
  .semifinal-rooting-card,
  .finals-bonus-card,
  .finals-survey-card {
    grid-column: 1;
  }

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

  .admin-final-answer-row {
    grid-template-columns: 1fr;
  }
}
