:root {
  --blue: #003DA5;
  --blue-dark: #002a73;
  --yellow: #FCD116;
  --white: #ffffff;
  --grey: #f2f4f8;
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--blue);
  color: #1a1a2e;
  min-height: 100vh;
}

.hidden { display: none !important; }

.site-header {
  text-align: center;
  padding: 16px 16px 8px;
}
.header-img {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25);
}
/* De titel staat al in de posterafbeelding; h1 blijft voor screenreaders. */
.site-header h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

main, .login-card, .topbar, .tabs {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  margin: 12px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
}
.card h2 { margin-top: 0; color: var(--blue); font-weight: 800; }

label { display: block; font-weight: 700; margin: 10px 0 4px; }

input, select {
  width: 100%;
  padding: 14px;
  font-size: 1.05rem;
  border: 3px solid var(--blue);
  border-radius: 12px;
  background: var(--white);
}
input:focus, select:focus { outline: 3px solid var(--yellow); }

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  font-size: 1.05rem;
  padding: 14px 22px;
  min-height: 48px;
}
.btn-primary {
  width: 100%;
  margin-top: 14px;
  background: var(--yellow);
  color: var(--blue);
  box-shadow: 0 3px 0 var(--blue-dark);
}
.btn-primary:active { transform: translateY(2px); box-shadow: none; }
.btn-small {
  background: var(--yellow);
  color: var(--blue);
  padding: 8px 16px;
  min-height: 40px;
  font-size: 0.9rem;
}

.error { color: #c0262d; font-weight: 700; min-height: 1.2em; margin-bottom: 0; }
.form-msg { font-weight: 700; min-height: 1.2em; margin-bottom: 0; color: var(--blue); }
.form-msg.is-error { color: #c0262d; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--white);
  padding: 4px 16px;
  font-weight: 700;
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px 0;
  flex-wrap: wrap;
}
.tab {
  flex: 1 1 auto;
  border: none;
  border-radius: 999px 999px 0 0;
  background: var(--blue-dark);
  color: var(--white);
  font-weight: 800;
  padding: 12px 10px;
  font-size: 0.95rem;
  cursor: pointer;
  min-height: 48px;
}
.tab.active { background: var(--yellow); color: var(--blue); }

.stage-title {
  color: var(--yellow);
  font-size: 1.15rem;
  font-weight: 900;
  margin: 18px 16px 2px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.match-card .teams {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
}
.match-card .team { flex: 1; }
.match-card .team.away { text-align: right; }
.match-card .kickoff { color: #555; font-size: 0.85rem; margin: 4px 0 8px; }
.match-card .venue { color: #555; font-size: 0.85rem; margin: 0 0 8px; }
.badge-group {
  background: var(--blue);
  color: var(--yellow);
  margin-right: 8px;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  text-transform: uppercase;
}
.badge-open { background: #d9f2dd; color: #146c2e; }
.badge-locked { background: #ffe1e1; color: #c0262d; }
.badge-finished { background: var(--blue); color: var(--yellow); }

.score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.score-row input {
  width: 76px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  padding: 12px 8px;
}
.score-row .dash { font-weight: 900; color: var(--blue); }
.score-row .btn { flex: 1; margin-top: 0; }

.final-score {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--blue);
  text-align: center;
  margin: 6px 0;
}
.my-pred { font-weight: 700; color: var(--blue); margin: 4px 0 0; }
.points-chip {
  display: inline-block;
  background: var(--yellow);
  color: var(--blue);
  border-radius: 999px;
  font-weight: 900;
  padding: 2px 10px;
  margin-left: 6px;
}

table.ranking {
  width: 100%;
  border-collapse: collapse;
}
table.ranking th, table.ranking td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 2px solid var(--grey);
}
table.ranking th { color: var(--blue); text-transform: uppercase; font-size: 0.78rem; }
table.ranking td.num, table.ranking th.num { text-align: right; }
table.ranking tr.me { background: #fff7cf; }
.rank-pos { font-weight: 900; color: var(--blue); width: 2em; }

.pred-list { list-style: none; padding: 0; margin: 8px 0 0; }
.pred-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--grey);
  font-size: 0.95rem;
}
.rules li { margin: 10px 0; line-height: 1.4; }
