/* ═══════════════════════════════════════════
   F1 BOT — MINI APP STYLES  v2
   Modern dark · Inter · glassmorphism-lite
═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Barlow+Condensed:wght@700;900&display=swap&font-display=swap');

:root {
  /* Surfaces */
  --bg:        #08080f;
  --surface:   #0f0f1a;
  --card:      #13131e;
  --card-hov:  #181826;
  --border:    rgba(255,255,255,0.07);
  --border-med:rgba(255,255,255,0.12);

  /* Brand */
  --red:       #E10600;
  --red-dim:   rgba(225,6,0,0.10);
  --red-glow:  rgba(225,6,0,0.20);
  --orange:    #f5a623;
  --orange-dim:rgba(245,166,35,0.10);

  /* Text */
  --text:      #f0f0f8;
  --text-sub:  #a0a0c0;
  --muted:     #5a5a7a;
  --past:      #707090;
  --green:     #22c55e;

  /* Misc */
  --radius:    10px;
  --radius-sm: 6px;
  --radius-pill: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overscroll-behavior: none; scroll-behavior: smooth; }

/* Focus visible — keyboard/accessibility */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Cursor pointer on all interactive elements */
button, [role="radio"], [role="tab"], select { cursor: pointer; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

/* ── Content ── */

#content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.tab-panel {
  display: none;
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 72px;
}

.tab-panel.active { display: block; }

/* ── Header ── */

.f1-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8,8,15,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px 12px;
}

.header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.f1-logo { display: flex; align-items: center; gap: 10px; }

.f1-badge {
  background: var(--red);
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 4px;
  clip-path: polygon(5px 0%, 100% 0%, calc(100% - 5px) 100%, 0% 100%);
}

.header-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
}

.season-badge {
  margin-left: auto;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  border: 1px solid rgba(225,6,0,0.4);
  background: var(--red-dim);
  padding: 3px 10px;
  letter-spacing: 1.5px;
  border-radius: var(--radius-sm);
}

/* ── Filter tabs ── */

.filter-row {
  display: flex;
  gap: 6px;
  background: var(--surface);
  padding: 4px;
  border-radius: var(--radius-pill);
}

.filter-btn {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: all 0.2s;
  flex: 1;
}

.filter-btn.active {
  background: var(--red);
  color: #fff;
  box-shadow: 0 2px 12px var(--red-glow);
}

/* ── Race list ── */

.race-list {
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Section label ── */

.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  padding: 10px 4px 6px;
}

/* ── Race card ── */

.race-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid transparent;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.1s, box-shadow 0.2s;
  user-select: none;
}

.race-card:active { transform: scale(0.984); }

.race-card.past {
  border-left-color: var(--border-med);
  opacity: 0.55;
}

.race-card.cancelled {
  border-left-color: rgba(231,76,60,0.4);
  opacity: 0.5;
}

.race-card.next {
  border-left-color: var(--orange);
  background: linear-gradient(135deg, rgba(245,166,35,0.06) 0%, var(--card) 60%);
  box-shadow: 0 0 0 1px rgba(245,166,35,0.15);
}

.race-card.future { border-left-color: var(--border-med); }

.round-col { text-align: center; }

.round-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--muted);
  line-height: 1;
}

.race-card.next .round-num { color: var(--orange); }

.round-label {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.card-flag { font-size: 16px; line-height: 1; display: block; margin-top: 5px; }

.race-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.1px;
  line-height: 1.2;
}

.race-card.past .race-name { color: var(--past); }

.race-circuit {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 400;
}

.race-date-col { text-align: right; min-width: 58px; }

.race-date {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-sub);
  line-height: 1;
}

.race-card.next .race-date { color: var(--orange); }

.status-tag {
  font-size: 9px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-top: 5px;
  font-weight: 700;
}

.tag-next      { color: var(--orange); }
.tag-past      { color: var(--muted); }
.tag-done      { color: var(--green); }
.tag-cancelled { color: #e74c3c; }

/* ── Detail view (slide) ── */

#view-list, #view-detail {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

#view-detail { transform: translateX(100%); }
#view-detail.open { transform: translateX(0); }

.detail-header { display: flex; align-items: center; }

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--red);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  padding: 0;
  min-height: 44px;
}

/* ── Detail content ── */

.detail-body { padding-bottom: 80px; }

.track-scheme {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  padding: 8px 32px;
  mix-blend-mode: screen;
}

.detail-race-header {
  text-align: center;
  padding: 20px 14px 16px;
}

.detail-flag { font-size: 56px; line-height: 1; margin-bottom: 12px; }

.detail-race-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.3px;
  line-height: 1.1;
}

.detail-location {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 5px;
  font-weight: 400;
}

.detail-round {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 5px;
  font-weight: 600;
}

.detail-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  margin: 20px 14px 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Session rows ── */

.session-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  margin: 0 14px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.session-card.race-session {
  border-left: 2px solid var(--red);
  background: linear-gradient(135deg, var(--red-dim) 0%, var(--card) 70%);
}

.session-name-text {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.session-card.race-session .session-name-text { color: var(--red); }

.session-time-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-sub);
}

.session-card.race-session .session-time-text { color: var(--red); }

.tz-label {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin: 8px 14px 0;
  letter-spacing: 0.3px;
}

/* ── Results section ── */

.results-loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 14px;
  color: var(--text-sub);
  font-size: 13px;
}

.muted-text { font-size: 12px; color: var(--muted); }

.results-img {
  width: calc(100% - 28px);
  margin: 0 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: block;
}

/* ── Refresh btn ── */

.refresh-btn {
  display: block;
  width: calc(100% - 28px);
  margin: 0 14px 16px;
  padding: 12px;
  background: var(--card);
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
}

.refresh-btn:hover {
  color: var(--text);
  border-color: var(--border-med);
  background: var(--card-hov);
}

/* ── Loading ── */

.center-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  gap: 14px;
  color: var(--text-sub);
  font-size: 14px;
}

.spinner-f1 {
  width: 32px;
  height: 32px;
  border: 2.5px solid var(--border-med);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm { width: 20px; height: 20px; border-width: 2px; }

@keyframes spin { to { transform: rotate(360deg); } }

.dots-anim::after {
  content: '';
  animation: dots 1.4s steps(4, end) infinite;
}

@keyframes dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
}

/* ── Subscription tab ── */

.sub-hero {
  text-align: center;
  padding: 32px 16px 20px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(225,6,0,0.10) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
}

.sub-hero-icon  { font-size: 52px; line-height: 1; margin-bottom: 14px; }

.sub-hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 1px;
}

.sub-hero-sub { font-size: 13px; color: var(--text-sub); margin-top: 6px; font-weight: 400; }

.features-list {
  padding: 8px 16px;
  margin: 8px 0;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

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

.feature-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.feature-title { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.feature-desc  { font-size: 12px; color: var(--text-sub); line-height: 1.5; font-weight: 400; }

.plan-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  padding: 12px 16px 8px;
}

#plan-cards { padding: 0 12px; display: flex; flex-direction: column; gap: 8px; }

.plan-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  user-select: none;
}

.plan-card:active { transform: scale(0.984); }

.plan-card.selected {
  border-color: var(--red);
  background: linear-gradient(135deg, rgba(225,6,0,0.08) 0%, var(--card) 70%);
  box-shadow: 0 0 0 1px var(--red-dim), 0 4px 20px var(--red-glow);
}

.plan-badge-hot {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--orange);
  margin-bottom: 8px;
}

.plan-row { display: flex; justify-content: space-between; align-items: center; }

.plan-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.1px;
}

.plan-save { font-size: 11px; color: var(--text-sub); margin-top: 3px; font-weight: 400; }

.plan-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--red);
}

.plan-card.selected .plan-price { color: #fff; }

.sub-cta-wrap { padding: 16px 12px 24px; }

/* ── CTA Button ── */

.confirm-btn {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 16px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 4px 24px var(--red-glow);
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.2s;
}

.confirm-btn:active { opacity: 0.85; transform: scale(0.98); }

.confirm-btn:disabled {
  background: var(--card);
  color: var(--muted);
  cursor: default;
  box-shadow: none;
}

/* ── Account tab ── */

.account-hero {
  text-align: center;
  padding: 28px 16px 20px;
  border-bottom: 1px solid var(--border);
}

.account-avatar { font-size: 56px; line-height: 1; margin-bottom: 10px; }

.account-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.account-id { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 400; }

.sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: var(--radius-pill);
}

.sub-badge.active   { background: rgba(34,197,94,0.12); color: var(--green); }
.sub-badge.inactive { background: var(--red-dim); color: var(--red); }

.sub-expires {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}

.info-section { padding: 0 16px; }

.info-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  padding: 16px 0 8px;
  border-bottom: 1px solid var(--border);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child { border-bottom: none; }

.info-label { font-size: 13px; color: var(--text-sub); font-weight: 400; }

.info-value {
  font-size: 14px;
  font-weight: 600;
}

/* ── Timezone select ── */

.tz-select-wrap {
  position: relative;
  margin: 12px 16px 0;
}

.tz-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: 13px;
}

select {
  width: 100%;
  padding: 13px 36px 13px 14px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

select:focus { border-color: var(--border-med); }

.tz-save-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 10px 16px 28px;
  padding: 14px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--red-glow);
  transition: opacity 0.15s, transform 0.1s;
}

.tz-save-btn:active { opacity: 0.85; transform: scale(0.98); }

.go-sub-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 14px 16px;
  padding: 14px;
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(225,6,0,0.3);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.go-sub-btn:active { opacity: 0.8; }

/* ── Bottom tab bar ── */

.tab-bar {
  flex-shrink: 0;
  display: flex;
  background: rgba(8,8,15,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 100;
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s;
  user-select: none;
  gap: 3px;
  position: relative;
}

.tab-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 30%;
  right: 30%;
  height: 2px;
  background: var(--red);
  border-radius: 0 0 2px 2px;
  transform: scaleX(0);
  transition: transform 0.2s;
}

.tab-btn.active { color: var(--red); }
.tab-btn.active::before { transform: scaleX(1); }

.tab-icon  { line-height: 1; }
.tab-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ── Tab SVG icons ── */
.tab-icon svg { display: block; }

/* ── Results table ── */

.results-table-wrap {
  padding: 0 14px 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 4px;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 340px;
}

.results-table thead tr {
  background: var(--red);
}

.results-table thead th {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  padding: 10px 8px;
  text-align: center;
  white-space: nowrap;
  text-transform: uppercase;
}

.results-table thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.results-table thead th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }

.results-table thead th:nth-child(2),
.results-table thead th:nth-child(3) { text-align: left; }

.results-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.results-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.015); }
.results-table tbody tr:hover { background: rgba(255,255,255,0.04); }

.results-table td {
  padding: 10px 8px;
  vertical-align: middle;
}

.res-pos {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
  width: 36px;
  white-space: nowrap;
}

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

.res-abbr {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding-left: 6px;
  white-space: nowrap;
}

.res-name {
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.3;
}

.res-num { font-size: 10px; color: var(--muted); }

.res-team {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.res-pts {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.res-status {
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
  font-weight: 500;
}

.status-ok  { color: var(--green); }
.status-dnf { color: var(--muted); }

/* ── Standings header & segmented control ── */

.standings-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8,8,15,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
}

.seg-control {
  position: relative;
  display: flex;
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 0;
}

.seg-indicator {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: var(--red);
  border-radius: var(--radius-pill);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px var(--red-glow);
  pointer-events: none;
}

.seg-btn {
  flex: 1;
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: color 0.2s;
  min-height: 44px;
}

.seg-btn.active { color: #fff; }

/* ── Standings ── */

.std-header {
  padding: 20px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.std-header-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.std-header-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.std-list {
  padding: 8px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.std-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.std-pos {
  width: 28px;
  text-align: center;
  font-size: 18px;
  flex-shrink: 0;
}

.std-pos-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 900;
  color: var(--text-sub);
}

.std-driver-col {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.std-code {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding-left: 8px;
  flex-shrink: 0;
  width: 36px;
}

.std-info { min-width: 0; }

.std-name {
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-sub);
}

.std-name strong {
  font-weight: 700;
  color: var(--text);
}

.std-team {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.std-right {
  text-align: right;
  flex-shrink: 0;
}

.std-pts {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.std-pts-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 1px;
}

.std-leader {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--orange);
  text-transform: uppercase;
  margin-top: 3px;
}

.std-gap {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 3px;
}

/* ── Constructor card ── */

.con-stripe {
  width: 4px;
  height: 36px;
  border-radius: 2px;
  flex-shrink: 0;
}

.con-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.1px;
}

.con-nat {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 400;
}

/* ── Standings content transition ── */

#standings-content {
  transition: opacity 0.15s;
}

/* ── Paywall ── */

.paywall-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 32px 40px;
  text-align: center;
  min-height: 60vh;
}

.paywall-icon {
  color: var(--muted);
  margin-bottom: 20px;
  opacity: 0.6;
}

.paywall-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.2px;
  margin-bottom: 10px;
}

.paywall-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  font-weight: 400;
  max-width: 260px;
  margin-bottom: 28px;
}

.paywall-btn {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 14px 32px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 24px var(--red-glow);
  transition: opacity 0.15s, transform 0.1s;
}

.paywall-btn:active { opacity: 0.85; transform: scale(0.97); }

/* ── Skeleton screens ── */

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.skel {
  background: linear-gradient(90deg,
    var(--card) 25%,
    var(--card-hov) 50%,
    var(--card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* Race list skeleton */
.skeleton-list {
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skel-card {
  height: 68px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--card) 25%, var(--card-hov) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

.skel-card:nth-child(2) { animation-delay: 0.1s; }
.skel-card:nth-child(3) { animation-delay: 0.2s; }
.skel-card:nth-child(4) { animation-delay: 0.3s; }
.skel-card:nth-child(5) { animation-delay: 0.4s; }

/* Detail skeleton */
.skel-detail { padding: 0 0 40px; }

.skel-detail-header {
  text-align: center;
  padding: 24px 20px 16px;
}

.skel-line {
  background: linear-gradient(90deg, var(--card) 25%, var(--card-hov) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
  display: block;
}

.skel-mx-auto { margin-left: auto; margin-right: auto; }
.skel-w-60 { width: 60%; }
.skel-w-40 { width: 40%; }
.skel-w-32 { width: 32%; }
.skel-w-20 { width: 20%; }
.skel-h-16 { height: 16px; }
.skel-h-10 { height: 10px; }
.skel-h-8  { height: 8px; }

.skel-sessions {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skel-session {
  height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--card) 25%, var(--card-hov) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

.skel-session:nth-child(2) { animation-delay: 0.08s; }
.skel-session:nth-child(3) { animation-delay: 0.16s; }
.skel-session:nth-child(4) { animation-delay: 0.24s; }
.skel-session:nth-child(5) { animation-delay: 0.32s; }

/* Standings skeleton */
.skeleton-standings {
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skel-std-row {
  height: 60px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--card) 25%, var(--card-hov) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

.skel-std-row:nth-child(2) { animation-delay: 0.07s; }
.skel-std-row:nth-child(3) { animation-delay: 0.14s; }
.skel-std-row:nth-child(4) { animation-delay: 0.21s; }
.skel-std-row:nth-child(5) { animation-delay: 0.28s; }
.skel-std-row:nth-child(6) { animation-delay: 0.35s; }
.skel-std-row:nth-child(7) { animation-delay: 0.42s; }
.skel-std-row:nth-child(8) { animation-delay: 0.49s; }

/* Account skeleton */
.skeleton-account { padding: 0 0 40px; }

.skel-account-hero {
  text-align: center;
  padding: 28px 16px 20px;
  border-bottom: 1px solid var(--border);
}

.skel-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto;
  background: linear-gradient(90deg, var(--card) 25%, var(--card-hov) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

.skel-rows {
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.skel-row-item {
  height: 48px;
  background: linear-gradient(90deg, var(--card) 25%, var(--card-hov) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-bottom: 1px solid var(--border);
}

.skel-row-item:nth-child(2) { animation-delay: 0.1s; }
.skel-row-item:nth-child(3) { animation-delay: 0.2s; }

/* ── Session type dots ── */

.session-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 2px;
}

.dot-practice  { background: #3b82f6; }
.dot-sprint-q  { background: #eab308; }
.dot-sprint    { background: #f97316; }
.dot-quali     { background: #a855f7; }
.dot-race      { background: var(--red); }

/* ── Plan badge ── */

.plan-badge-hot {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--orange);
  background: var(--orange-dim);
  border: 1px solid rgba(245,166,35,0.25);
  border-radius: 4px;
  padding: 2px 7px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* ── Empty state ── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  gap: 8px;
}

.empty-state svg { opacity: 0.4; margin-bottom: 4px; }
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--text-sub); }
.empty-state-desc  { font-size: 13px; line-height: 1.5; }

/* ── Notification toggles ── */

.notif-desc {
  font-size: 12px;
  color: var(--muted);
  padding: 0 16px 10px;
  line-height: 1.5;
}

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

.notif-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.notif-row:last-child { border-bottom: none; }

.notif-label { font-size: 14px; color: var(--text); }

.toggle-switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border-med);
  border-radius: 26px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--red); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Utils ── */

.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
