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


:root {
  --bg: #0b0b11;
  --bg-card: #14141f;
  --bg-card-hover: #1c1c2e;
  --bg-glass: rgba(255, 255, 255, 0.03);
  --text: #eeeef2;
  --text-dim: #7a7a92;
  --text-muted: #45455a;
  --accent: #e10600;
  --accent-glow: rgba(225, 6, 0, 0.25);
  --border: #1e1e30;
  --green: #22c55e;
  --r: 14px;
}

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* ── Header ───────────────────────────────────── */
header {
  padding: 40px 0 12px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.header-left { flex: 1; }

.header-center {
  text-align: center;
}

.header-right {
  flex: 1;
  text-align: right;
}

.oslo-clock-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.oslo-clock {
  font-size: 1.1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

header h1 {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 5px;
}

.accent {
  color: var(--accent);
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Tabs ─────────────────────────────────────── */
.series-tabs {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin: 20px auto 28px;
  background: var(--bg-card);
  border-radius: 100px;
  padding: 4px;
  width: fit-content;
  border: 1px solid var(--border);
}

.tab {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 9px 24px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

body[data-series="f2"] .tab.active { background: #006daa; }
body[data-series="indycar"] .tab.active { background: #1a3a7a; }
body[data-series="f2"] { --accent: #006daa; --accent-glow: rgba(0, 109, 170, 0.25); }
body[data-series="indycar"] { --accent: #1a3a7a; --accent-glow: rgba(26, 58, 122, 0.25); }

/* ── Hero / Countdown ─────────────────────────── */
.hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 28px;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(225, 6, 0, 0.08) 100%);
  border: 1px solid var(--border);
}

body[data-series="f2"] .hero {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0, 109, 170, 0.1) 100%);
}

body[data-series="indycar"] .hero {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(26, 58, 122, 0.1) 100%);
}

.hero-content {
  width: 100%;
  padding: 36px 28px;
}

.hero-flag {
  font-size: 1.6rem;
  margin-bottom: 6px;
  font-family: 'Twemoji Country Flags', sans-serif;
}

.hero-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hero-title {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 2px;
}

.hero-circuit {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 300;
  margin-bottom: 24px;
}

.countdown {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cd-block {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 68px;
  text-align: center;
}

.cd-num {
  font-size: 1.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.cd-label {
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-top: 4px;
}

.cd-sep {
  font-size: 1.5rem;
  color: var(--text-muted);
  font-weight: 300;
  padding-bottom: 16px;
}

.countdown-target {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.cd-live-badge {
  display: inline-block;
  background: var(--green);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 6px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ── Sessions ─────────────────────────────────── */
.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-left: 2px;
}

.sessions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 32px;
}

.session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border-radius: var(--r);
  padding: 14px 18px;
  border: 1px solid var(--border);
  transition: background 0.15s;
}

.session:hover {
  background: var(--bg-card-hover);
}

.session.past {
  opacity: 0.35;
}

.session.live {
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.12);
}

.s-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.s-badge {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

.s-badge.practice   { background: rgba(250, 204, 21, 0.12); color: #facc15; }
.s-badge.qualifying  { background: rgba(168, 85, 247, 0.12); color: #c084fc; }
.s-badge.sprint      { background: rgba(6, 182, 212, 0.12);  color: #22d3ee; }
.s-badge.race        { background: rgba(225, 6, 0, 0.12);    color: #f87171; }

.s-name {
  font-weight: 600;
  font-size: 0.88rem;
}

.s-day {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 1px;
}

.s-right {
  text-align: right;
}

.s-time {
  font-weight: 600;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.s-status {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.s-status.live-text {
  color: var(--green);
  font-weight: 600;
}

/* ── Calendar ─────────────────────────────────── */
.calendar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 8px;
  margin-bottom: 32px;
}

.cal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--r);
  padding: 12px 14px;
  border: 1px solid var(--border);
  transition: background 0.15s;
}

.cal-item:hover {
  background: var(--bg-card-hover);
}

.cal-item.next {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.cal-item.past {
  opacity: 0.35;
}

.cal-round {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  flex-shrink: 0;
}

.cal-info {
  flex: 1;
  min-width: 0;
}

.cal-name {
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-date {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 1px;
}

.cal-flag {
  font-size: 1.15rem;
  flex-shrink: 0;
  font-family: 'Twemoji Country Flags', sans-serif;
}

/* ── Loading ──────────────────────────────────── */
.loading-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ── Footer ───────────────────────────────────── */
footer {
  text-align: center;
  padding: 8px 0 20px;
  color: var(--text-muted);
  font-size: 0.72rem;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 600px) {
  header h1 { font-size: 1.8rem; letter-spacing: 3px; }
  .tab { padding: 8px 16px; font-size: 0.78rem; }
  .hero-content { padding: 24px 20px; }
  .hero-title { font-size: 1.4rem; }
  .cd-block { min-width: 56px; padding: 10px 12px; }
  .cd-num { font-size: 1.5rem; }
  .session { padding: 12px 14px; }
  .calendar { grid-template-columns: 1fr; }
}

/* Side ad containers */
.sidebar-slot {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  border: 1px dashed #555;
  border-radius: 10px;
  color: #777;
  text-align: center;
  z-index: 9999;
}
.sidebar-slot span { font-size: 0.85rem; font-weight: 500; }
.sidebar-slot small { font-size: 0.7rem; opacity: 0.6; }
.sidebar-slot-left { left: 20px; }
.sidebar-slot-right { right: 20px; }
@media (max-width: 1250px) { .sidebar-slot { display: none; } }
