:root {
  --blue: #2a5f9e;
  --blue-dark: #1a4a80;
  --bg: #111418;
  --surface: #1a1f27;
  --border: #252b36;
  --text: #e4e4e4;
  --muted: #6b7280;
  --danger: #dc2626;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── SCOREBOARD ─────────────────────────────────────────── */

header { padding: 48px 20px 0; }

.scoreboard-wrap {
  display: flex;
  justify-content: center;
}

.scoreboard {
  background: var(--blue);
  border: 3px solid var(--blue-dark);
  border-radius: 8px;
  padding: 32px 40px 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.board-heading {
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: #fff;
  line-height: 1.05;
  margin-bottom: 20px;
}

.bh-line      { font-size: clamp(52px, 11vw, 82px); }
.bh-line.bh-small { font-size: clamp(34px, 7vw, 54px); }

.counter-panel {
  background: #141414;
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.digit-card {
  background: #efefef;
  border-radius: 8px;
  width: 82px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.35);
  transition: opacity 0.15s;
}

.digit-card::before {
  content: '';
  position: absolute;
  inset: 0 0 50% 0;
  background: #f8f8f8;
}

.digit-card::after {
  content: '';
  position: absolute;
  top: calc(50% - 1px);
  left: 0; right: 0;
  height: 2px;
  background: #aaa;
}

.digit-card span {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 68px;
  color: #111;
  position: relative;
  z-index: 1;
  line-height: 1;
}

.last-event-note {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 14px;
  padding-bottom: 36px;
}

/* ── EVENTS LIST ─────────────────────────────────────────── */

main {
  flex: 1;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.events-list { display: flex; flex-direction: column; }

.event-item {
  border-left: 3px solid var(--blue);
  padding: 18px 0 18px 18px;
  border-bottom: 1px solid var(--border);
}

.event-item:last-child { border-bottom: none; }

.event-date {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.event-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 6px;
}

.event-desc {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.55;
  margin-bottom: 8px;
}

.event-source {
  font-size: 12px;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.event-source:hover { border-color: var(--blue); }

.placeholder {
  color: var(--muted);
  text-align: center;
  padding: 48px 0;
  font-size: 14px;
}

/* ── FOOTER ─────────────────────────────────────────────── */

footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--border);
}

footer a { color: var(--muted); font-size: 12px; text-decoration: none; }
footer a:hover { color: var(--text); }

/* ── ADMIN ───────────────────────────────────────────────── */

.admin-body { background: #0d1117; }

.admin-screen { min-height: 100vh; }
.hidden { display: none !important; }

/* Login */
#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 40px 36px;
  width: 100%;
  max-width: 360px;
}

.admin-logo {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  color: var(--blue);
  letter-spacing: 2px;
  margin-bottom: 24px;
  text-align: center;
}

.admin-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 24px;
  text-align: center;
}

/* Admin panel layout */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-logo-sm {
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  color: var(--blue);
  letter-spacing: 2px;
}

.admin-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.admin-section {}

.section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.field label {
  font-size: 13px;
  color: #9ca3af;
}

.required { color: var(--danger); }

.field input,
.field textarea,
.field select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus,
.field textarea:focus { border-color: var(--blue); }

.field textarea { resize: vertical; }

.field-row {
  display: flex;
  gap: 16px;
}

.add-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.error-msg {
  font-size: 13px;
  color: var(--danger);
  min-height: 18px;
}

/* Buttons */
.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 9px 18px;
  transition: opacity 0.15s, background 0.15s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--blue);
  color: #fff;
  align-self: flex-start;
}
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: #4b5563; }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid transparent;
  padding: 4px 10px;
  font-size: 12px;
}
.btn-danger:hover { border-color: var(--danger); }

/* Admin event row */
.admin-event-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.admin-event-item:last-child { border-bottom: none; }

.admin-event-body { flex: 1; min-width: 0; }

.admin-event-date {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 3px;
}

.admin-event-title {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.load-more {
  margin-top: 16px;
  width: 100%;
  justify-content: center;
}

@media (max-width: 520px) {
  .field-row { flex-direction: column; }
  .scoreboard { padding: 24px 20px 18px; }
}
