:root {
  --bg: #0a1120;
  --bg2: #0f1b33;
  --card: #14213d;
  --line: #223458;
  --text: #eaf0ff;
  --muted: #9fb0d0;
  --spain: #e63946;
  --spain2: #f4a11a;
  --france: #2b6cff;
  --accent: #37d67a;
  --shadow: 0 20px 60px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% -10%, #16305e 0%, transparent 60%),
    radial-gradient(1000px 500px at 90% 0%, #3a1030 0%, transparent 55%),
    linear-gradient(180deg, var(--bg2), var(--bg));
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 620px; margin: 0 auto; padding: 22px 18px 60px; }
.wrap-wide { max-width: 980px; }

.live-badge {
  position: fixed; top: 14px; right: 14px; z-index: 20;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(10,17,32,.8); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 14px; font-weight: 600;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(55,214,122,.7); animation: pulse 1.6s infinite; }
.dot.red { background: #ff3b5c; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,59,92,.6);} 70%{box-shadow:0 0 0 10px rgba(255,59,92,0);} 100%{box-shadow:0 0 0 0 rgba(255,59,92,0);} }

.hero { text-align: center; margin: 26px 0 20px; }
.badge-match {
  display: inline-block; font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; margin-bottom: 16px;
}
h1 { font-size: 30px; line-height: 1.15; margin: 6px 0 8px; }
.teams { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 10px 0 6px; }
.team { font-size: 22px; font-weight: 800; }
.team.home { color: var(--spain2); }
.team.away { color: var(--france); }
.vs { color: var(--muted); font-weight: 700; }
.sub { color: var(--muted); font-size: 15px; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
  background-color: var(--card);
  border: 1px solid var(--line); border-radius: 18px; padding: 22px;
  box-shadow: var(--shadow); margin-top: 18px;
}
label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 7px; font-weight: 600; }
.field { margin-bottom: 18px; }
input[type=text], input[type=password], input[type=datetime-local], input[type=number] {
  width: 100%; padding: 13px 14px; font-size: 16px; color: var(--text);
  background: #0c1730; border: 1px solid var(--line); border-radius: 12px; outline: none;
}
input:focus { border-color: #3b62a8; box-shadow: 0 0 0 3px rgba(59,98,168,.25); }

.score-block { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: start; }
.score-col .cap { text-align: center; font-weight: 800; margin-bottom: 10px; }
.score-col.home .cap { color: var(--spain2); }
.score-col.away .cap { color: var(--france); }
.nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.num {
  padding: 12px 0; text-align: center; font-size: 18px; font-weight: 800; cursor: pointer;
  background: #0c1730; border: 1px solid var(--line); border-radius: 12px; color: var(--text);
  user-select: none; transition: transform .05s, background .15s, border-color .15s;
}
.num:hover { border-color: #3b62a8; }
.num:active { transform: scale(.96); }
.num.sel-home { background: rgba(230,57,70,.18); border-color: var(--spain); color: #ffd9dc; }
.num.sel-away { background: rgba(43,108,255,.18); border-color: var(--france); color: #d7e4ff; }
.colon { align-self: center; font-size: 30px; font-weight: 800; color: var(--muted); padding-top: 34px; }

.pick-preview { text-align: center; font-size: 15px; color: var(--muted); margin-top: 14px; min-height: 22px; }
.pick-preview b { color: var(--text); font-size: 20px; }

button.primary {
  width: 100%; padding: 15px; font-size: 17px; font-weight: 800; cursor: pointer; color: #06110a;
  background: linear-gradient(180deg, #45e389, var(--accent)); border: none; border-radius: 12px; margin-top: 6px;
}
button.primary:disabled { background: #2a3a55; color: #7488ab; cursor: not-allowed; }
button.ghost {
  padding: 12px 16px; font-weight: 700; cursor: pointer; color: var(--text);
  background: #12213f; border: 1px solid var(--line); border-radius: 10px;
}

.countdown { display: flex; justify-content: center; gap: 10px; margin: 8px 0 2px; }
.cd-box { background: #0c1730; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; text-align: center; min-width: 62px; }
.cd-box .n { font-size: 26px; font-weight: 800; }
.cd-box .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

.msg { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-weight: 600; display: none; }
.msg.ok { display: block; background: rgba(55,214,122,.14); border: 1px solid rgba(55,214,122,.4); color: #b6ffd4; }
.msg.err { display: block; background: rgba(255,59,92,.14); border: 1px solid rgba(255,59,92,.4); color: #ffc7d1; }

.closed-banner { text-align: center; background: rgba(255,59,92,.12); border: 1px solid rgba(255,59,92,.4); color: #ffc7d1; padding: 14px; border-radius: 12px; font-weight: 700; margin-top: 16px; }

.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 26px; }
a { color: #9cc0ff; }

/* live page */
.big-count { text-align: center; margin: 24px 0; }
.big-count .n { font-size: 68px; font-weight: 900; line-height: 1; }
.big-count .l { color: var(--muted); text-transform: uppercase; letter-spacing: .2em; font-size: 13px; }
.reveal-score { text-align: center; font-size: 54px; font-weight: 900; margin: 10px 0; }
.winner-list { list-style: none; padding: 0; margin: 12px 0 0; }
.winner-list li { background: #0c1730; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; font-weight: 700; display: flex; align-items: center; gap: 12px; animation: pop .4s ease; }
.winner-list li .rank { background: linear-gradient(180deg,#f4a11a,#e07d10); color:#241200; width: 30px; height: 30px; border-radius: 50%; display:flex; align-items:center; justify-content:center; font-weight:900; flex: none; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.waiting { text-align: center; color: var(--muted); padding: 20px; }

/* admin */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 8px; }
.stat { background: #0c1730; border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.stat .n { font-size: 28px; font-weight: 800; }
.stat .l { color: var(--muted); font-size: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
h2 { font-size: 18px; margin: 0 0 14px; }
.hint { color: var(--muted); font-size: 13px; margin: -6px 0 14px; }

/* T&C checkbox + modal */
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text); margin: 4px 0 16px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.modal-bg { display: none; position: fixed; inset: 0; background: rgba(4,8,16,.7); z-index: 50; align-items: center; justify-content: center; padding: 18px; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: 16px; max-width: 560px; width: 100%; max-height: 82vh; overflow-y: auto; padding: 24px; box-shadow: var(--shadow); }
.tnc-body { font-size: 14px; color: var(--text); }
.tnc-body ol { padding-left: 20px; }
.tnc-body li { margin-bottom: 9px; }
.tnc-body .sub { margin-top: 14px; }
.tnc-card h2 { font-size: 16px; }
.tnc-list { padding-left: 20px; margin: 0; font-size: 14px; color: var(--text); }
.tnc-list li { margin-bottom: 9px; }

/* prizes on the live page */
.prize-list { list-style: none; padding: 0; margin: 4px 0 0; }
.prize-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #0c1730; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }
.prize-list .place { font-weight: 700; }
.prize-list .amt { font-weight: 800; color: var(--spain2); font-size: 18px; }
