/* ============================================
   GRIDSTOP — STYLES v2.0
   ============================================ */

:root {
  --red: #e10600;
  --red-dark: #bf0500;
  --red-glow: rgba(225, 6, 0, 0.25);
  --green: #16a34a;
  --amber: #d97706;
  --blue: #2563eb;

  --bg-primary: #f7f7ff;
  --bg-secondary: #eeeef8;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f8ff;
  --text-primary: #060610;
  --text-secondary: #40405c;
  --text-muted: #71718a;
  --border: rgba(8, 8, 40, 0.09);
  --border-light: rgba(8, 8, 40, 0.04);
  --shadow: rgba(8, 8, 40, 0.08);
  --shadow-lg: rgba(8, 8, 40, 0.16);
  --shadow-xl: rgba(8, 8, 40, 0.28);
  --overlay: rgba(247, 247, 255, 0.97);
  --header-bg: rgba(247, 247, 255, 0.98);
  --hero-gradient: linear-gradient(160deg, #06060f 0%, #0f0f22 35%, #0a0a1c 65%, #100010 100%);
  --page-hero-gradient: linear-gradient(160deg, #06060f 0%, #0f0020 100%);
  --table-stripe: rgba(8, 8, 40, 0.025);
  --tag-bg: rgba(8, 8, 40, 0.06);
  --modal-bg: #ffffff;
  --input-bg: rgba(8, 8, 40, 0.04);
  --input-border: rgba(8, 8, 40, 0.14);
}

.dark-mode {
  --bg-primary: #06060f;
  --bg-secondary: #0b0b18;
  --bg-card: #0f0f1e;
  --bg-card-hover: #141428;
  --text-primary: #ededf8;
  --text-secondary: #8080a0;
  --text-muted: #50506a;
  --border: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.03);
  --shadow: rgba(0, 0, 0, 0.45);
  --shadow-lg: rgba(0, 0, 0, 0.65);
  --shadow-xl: rgba(0, 0, 0, 0.85);
  --overlay: rgba(6, 6, 15, 0.97);
  --header-bg: rgba(6, 6, 15, 0.98);
  --table-stripe: rgba(255, 255, 255, 0.02);
  --tag-bg: rgba(255, 255, 255, 0.05);
  --modal-bg: #0f0f1e;
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-border: rgba(255, 255, 255, 0.1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
table { width: 100%; border-collapse: collapse; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: 'Rajdhani', sans-serif; font-weight: 700; line-height: 1.1; }
input, select, textarea { font-family: 'Inter', sans-serif; font-size: 0.95rem; color: var(--text-primary); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute; top: -100%; left: 16px;
  background: var(--red); color: #fff;
  padding: 10px 20px; font-weight: 700; z-index: 9999;
  border-radius: 0 0 8px 8px;
  font-family: 'Rajdhani', sans-serif; font-size: 0.9rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; outline: none; }

/* ---------- Focus ---------- */
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
button:focus-visible, a:focus-visible { border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff;
  font-family: 'Rajdhani', sans-serif; font-weight: 700;
  font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 12px 32px; border-radius: 8px;
  border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(225, 6, 0, 0.35);
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent);
  pointer-events: none;
}
.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px); box-shadow: 0 6px 28px rgba(225,6,0,0.5); }
.btn-primary:active { transform: scale(0.98); box-shadow: 0 2px 12px rgba(225,6,0,0.3); }
.btn-primary.btn-lg { padding: 14px 40px; font-size: 1.05rem; }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-card); color: var(--text-primary);
  font-family: 'Rajdhani', sans-serif; font-weight: 600;
  font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 10px 22px; border-radius: 8px; border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: rgba(225,6,0,0.3); transform: translateY(-1px); }
.btn-link { background: none; border: none; color: var(--text-muted); font-size: 0.85rem; cursor: pointer; transition: color 0.2s; padding: 8px 0; }
.btn-link:hover { color: var(--red); }
.btn-auth {
  font-family: 'Rajdhani', sans-serif; font-weight: 700;
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 9px 20px; border-radius: 8px;
  background: var(--red); color: #fff;
  min-height: 44px; display: inline-flex; align-items: center;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(225,6,0,0.3);
}
.btn-auth:hover { background: var(--red-dark); box-shadow: 0 4px 20px rgba(225,6,0,0.45); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 1000; }
.header-top { background: var(--red); color: #fff; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; }
.header-top-inner { display: flex; align-items: center; height: 34px; overflow: hidden; }
.ticker-label {
  background: #000; color: var(--red);
  padding: 2px 12px; font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em;
  flex-shrink: 0; margin-right: 12px; text-transform: uppercase;
}
.ticker-wrapper { overflow: hidden; flex: 1; position: relative; }
.ticker-content { display: flex; gap: 60px; white-space: nowrap; animation: ticker 30s linear infinite; }
.ticker-content span { display: inline-block; }
@keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

.main-nav {
  background: var(--header-bg);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px var(--shadow);
}
.nav-inner { display: flex; align-items: center; height: 64px; gap: 24px; }
.logo {
  display: flex; align-items: baseline; gap: 2px;
  font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.6rem;
  letter-spacing: -0.02em; white-space: nowrap;
}
.logo-grid { color: var(--text-primary); }
.logo-stop { color: var(--red); }
.logo-f1 {
  font-size: 0.75rem; font-weight: 700;
  background: var(--red); color: #fff;
  padding: 2px 6px; border-radius: 4px; margin-left: 4px;
  vertical-align: super; box-shadow: 0 2px 8px rgba(225,6,0,0.4);
}
.nav-links { display: flex; gap: 2px; flex: 1; }
.nav-links a {
  font-family: 'Rajdhani', sans-serif; font-size: 0.9rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 8px 12px; border-radius: 6px;
  transition: all 0.2s; color: var(--text-secondary); position: relative;
}
.nav-links a:hover { color: var(--text-primary); background: var(--bg-secondary); }
.nav-links a.active { color: var(--red); background: rgba(225,6,0,0.08); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 2px; background: var(--red); border-radius: 1px;
}
.nav-actions { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.search-toggle, .theme-toggle {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s; color: var(--text-secondary);
}
.search-toggle:hover, .theme-toggle:hover { background: var(--bg-secondary); color: var(--text-primary); }

/* ─── LANGUAGE PICKER ─── */
.lang-picker { position: relative; }
.lang-btn {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer; transition: background 0.2s;
  color: var(--text-secondary);
}
.lang-btn:hover { background: var(--bg-secondary); }
.lang-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 32px var(--shadow-lg);
  min-width: 160px; z-index: 200; overflow: hidden;
  padding: 4px 0;
}
.lang-dropdown.active { display: block; }
.lang-item {
  padding: 9px 16px; font-size: 0.875rem; cursor: pointer;
  color: var(--text-secondary); transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.lang-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.lang-item.lang-active { color: var(--red); font-weight: 600; }
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
[dir="rtl"] .nav-actions { margin-left: 0; margin-right: auto; }
[dir="rtl"] .nav-inner { flex-direction: row-reverse; }

.dark-mode .icon-moon { display: none; }
.dark-mode .icon-sun { display: block; }
.icon-sun { display: none; }
.icon-moon { display: block; }
.mobile-menu-btn {
  display: none; flex-direction: column; gap: 5px;
  width: 44px; height: 44px; align-items: center; justify-content: center;
}
.mobile-menu-btn span { width: 22px; height: 2px; background: var(--text-primary); transition: all 0.3s; border-radius: 2px; }
.mobile-menu-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* User Dropdown */
.user-dropdown { position: relative; }
.user-avatar-btn { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 10px; transition: background 0.2s; }
.user-avatar-btn:hover { background: var(--bg-secondary); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(225,6,0,0.4);
}
.user-name-short { font-size: 0.85rem; font-weight: 500; }
.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--modal-bg); border: 1px solid var(--border);
  border-radius: 14px; min-width: 200px;
  box-shadow: 0 20px 60px var(--shadow-xl);
  padding: 6px; z-index: 100;
}
.dropdown-menu.active { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px; font-size: 0.9rem;
  transition: background 0.15s; width: 100%;
  color: var(--text-primary); text-align: left;
}
.dropdown-item:hover { background: var(--bg-secondary); }
.dropdown-item svg { flex-shrink: 0; color: var(--text-muted); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.logout-btn { color: var(--red); }
.logout-btn svg { color: var(--red); }

/* Search Overlay */
.search-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--overlay); z-index: 2000;
  display: none; flex-direction: column;
  padding-top: 120px; backdrop-filter: blur(24px);
}
.search-overlay.active { display: flex; }
.search-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: 14px; padding: 16px 20px;
  box-shadow: 0 8px 40px var(--shadow-lg);
}
.search-bar:focus-within { border-color: var(--red); box-shadow: 0 8px 40px var(--shadow-lg), 0 0 0 4px var(--red-glow); }
.search-bar svg { flex-shrink: 0; color: var(--text-muted); }
.search-bar input { flex: 1; border: none; background: none; font-size: 1.1rem; color: var(--text-primary); outline: none; }
.search-bar input::placeholder { color: var(--text-muted); }
.search-close { font-size: 1.5rem; color: var(--text-muted); padding: 4px; }
.search-close:hover { color: var(--text-primary); }
.search-results { margin-top: 20px; max-height: 60vh; overflow-y: auto; }
.search-result-item { padding: 14px 16px; border-radius: 10px; cursor: pointer; transition: background 0.15s; }
.search-result-item:hover { background: var(--bg-secondary); }
.search-result-item h4 { font-size: 1rem; margin-bottom: 4px; }
.search-result-item p { font-size: 0.85rem; color: var(--text-secondary); }
.search-result-item .search-result-tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--red); letter-spacing: 0.06em; }

/* ---------- Modals ---------- */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); z-index: 3000;
  align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(8px);
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--modal-bg); border-radius: 20px;
  width: 100%; max-width: 440px; padding: 36px; position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
  max-height: 90vh; overflow-y: auto;
}
.modal-article { max-width: 720px; padding: 48px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--text-muted); background: var(--bg-secondary);
  transition: all 0.2s;
}
.modal-close:hover { color: var(--text-primary); background: var(--border); transform: rotate(90deg); }
.modal-tabs { display: flex; gap: 4px; margin-bottom: 28px; }
.modal-tab {
  flex: 1; padding: 10px; border-radius: 8px;
  font-family: 'Rajdhani', sans-serif; font-weight: 700;
  font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--bg-secondary); color: var(--text-muted); transition: all 0.2s;
}
.modal-tab.active { background: var(--red); color: #fff; box-shadow: 0 4px 16px rgba(225,6,0,0.35); }

/* Auth Forms */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.form-group input {
  padding: 13px 16px; border-radius: 10px;
  border: 1.5px solid var(--input-border);
  background: var(--input-bg); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-glow); }
.form-error { font-size: 0.85rem; color: var(--red); min-height: 20px; }
.form-success { font-size: 0.85rem; color: var(--green); min-height: 20px; }
.form-info { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 8px; }

/* Article Detail */
.article-detail-tag { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
.article-detail-title { font-size: 2rem; margin-bottom: 16px; line-height: 1.15; }
.article-detail-meta { display: flex; gap: 16px; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.article-detail-body { font-size: 1rem; line-height: 1.85; color: var(--text-secondary); }
.article-detail-body p { margin-bottom: 18px; }
.article-detail-source { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-muted); }
.article-detail-source a { color: var(--red); text-decoration: underline; }

/* ---------- Hero ---------- */
.hero {
  background: var(--hero-gradient);
  padding: 56px 0 64px; color: #fff;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -55deg, transparent 0, transparent 60px,
    rgba(225,6,0,0.018) 60px, rgba(225,6,0,0.018) 61px
  );
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--red) 30%, var(--red) 70%, transparent 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.hero-main {
  display: flex; flex-direction: column; justify-content: center;
  padding: 36px; border-radius: 20px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px) saturate(120%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: background 0.25s, box-shadow 0.25s;
  position: relative; overflow: hidden; cursor: pointer;
}
.hero-main::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--red) 0%, rgba(225,6,0,0.3) 60%, transparent 100%);
}
.hero-main:hover { background: rgba(255,255,255,0.09); box-shadow: 0 12px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.12); }
.hero-badge {
  display: inline-block; width: fit-content;
  background: var(--red); color: #fff;
  font-family: 'Rajdhani', sans-serif; font-weight: 700;
  font-size: 0.75rem; letter-spacing: 0.14em;
  padding: 4px 14px; border-radius: 4px; margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(225,6,0,0.5);
}
.hero-main h1 { font-size: 2.6rem; margin-bottom: 14px; line-height: 1.05; }
.hero-main p { color: rgba(255,255,255,0.72); margin-bottom: 20px; font-size: 1.05rem; line-height: 1.65; }
.hero-main .article-meta { margin-bottom: 20px; }
.article-meta { display: flex; gap: 16px; font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; }
.hero .article-meta { color: rgba(255,255,255,0.45); }
.source { font-style: italic; }
.read-more {
  font-family: 'Rajdhani', sans-serif; font-weight: 700;
  color: var(--red); font-size: 1rem; transition: color 0.2s, letter-spacing 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.read-more:hover { color: #ff2a25; letter-spacing: 0.02em; }
.hero-side { display: flex; flex-direction: column; gap: 12px; }
.hero-card {
  flex: 1; padding: 20px 24px; border-radius: 14px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(12px);
  transition: background 0.2s, transform 0.2s; cursor: pointer;
  position: relative; overflow: hidden;
}
.hero-card::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--red); opacity: 0; transition: opacity 0.2s;
}
.hero-card:hover { background: rgba(255,255,255,0.09); transform: translateX(4px); }
.hero-card:hover::after { opacity: 1; }
.hero-card-tag { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.1em; color: var(--red); }
.hero-card h3 { font-size: 1.05rem; margin-top: 8px; line-height: 1.3; }
.hero-card .article-meta { margin-top: 10px; }

/* ---------- Stats Bar ---------- */
.stats-bar { background: var(--bg-secondary); border-bottom: 1px solid var(--border); padding: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-item {
  display: flex; flex-direction: column; gap: 3px;
  text-align: center; padding: 22px 16px;
  border-right: 1px solid var(--border); position: relative;
}
.stat-item:last-child { border-right: none; }
.stat-item::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px; background: var(--red); transition: width 0.3s;
}
.stat-item:hover::after { width: 60%; }
.stat-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.stat-value { font-family: 'Rajdhani', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--text-primary); line-height: 1.1; }
.stat-sub { font-size: 0.8rem; color: var(--text-secondary); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-secondary); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.section-header h2 { font-size: 1.8rem; position: relative; padding-left: 16px; }
.section-header h2::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 70%; background: var(--red); border-radius: 2px;
}
.see-all {
  font-family: 'Rajdhani', sans-serif; font-size: 0.85rem;
  font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 4px; transition: gap 0.2s;
}
.see-all:hover { gap: 8px; }

/* ---------- News Grid ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out, border-color 0.2s; cursor: pointer;
}
.news-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px var(--shadow-lg); border-color: rgba(225,6,0,0.2); }
.news-card-image {
  height: 200px;
  background: linear-gradient(135deg, #0d0d22 0%, #1a1a3a 50%, #0f0f28 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.news-card-image::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg, transparent 0, transparent 24px,
    rgba(255,255,255,0.015) 24px, rgba(255,255,255,0.015) 25px
  );
}
.news-card-image::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(to top, rgba(225,6,0,0.18), transparent);
}
.news-card-image .card-tag {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  background: var(--red); color: #fff;
  font-family: 'Rajdhani', sans-serif; font-weight: 700;
  font-size: 0.75rem; letter-spacing: 0.1em;
  padding: 4px 10px; border-radius: 4px; text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(225,6,0,0.5);
}
.card-graphic {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.2; transition: opacity 0.3s; pointer-events: none;
}
.news-card:hover .card-graphic { opacity: 0.32; }
.news-card-body { padding: 20px; }
.news-card-body h3 { font-size: 1.1rem; margin-bottom: 10px; line-height: 1.3; transition: color 0.2s; }
.news-card:hover .news-card-body h3 { color: var(--red); }
.news-card-body p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-body .article-meta { font-size: 0.78rem; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; color: var(--text-muted); }
.article-meta .dot { opacity: 0.45; font-size: 0.7rem; }
.article-meta .read-time { color: var(--text-muted); }

/* Featured card — editorial horizontal layout */
.news-card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.6fr 1fr; }
.news-card.featured .news-card-image { height: 100%; min-height: 300px; }
.news-card.featured .news-card-body { padding: 36px 40px; display: flex; flex-direction: column; justify-content: center; }
.news-card.featured .news-card-body h3 { font-size: 1.55rem; margin-bottom: 14px; }
.news-card.featured .news-card-body p { -webkit-line-clamp: 5; font-size: 0.925rem; }

/* ---------- News List ---------- */
.news-list { display: flex; flex-direction: column; gap: 14px; padding-bottom: 40px; }
.news-list-item {
  display: grid; grid-template-columns: 200px 1fr; gap: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; cursor: pointer;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s;
}
.news-list-item:hover { transform: translateX(6px); box-shadow: 0 6px 28px var(--shadow); border-color: rgba(225,6,0,0.2); }
.news-list-image {
  background: linear-gradient(135deg, #0d0d22 0%, #1a1a3a 100%);
  display: flex; align-items: center; justify-content: center;
  min-height: 140px; position: relative; overflow: hidden;
}
.news-list-image::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg, transparent 0, transparent 20px,
    rgba(255,255,255,0.015) 20px, rgba(255,255,255,0.015) 21px
  );
}
.news-list-image::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 45%;
  background: linear-gradient(to top, rgba(225,6,0,0.18), transparent);
}
.news-list-item:hover .card-graphic { opacity: 0.32; }
.news-list-image .card-tag {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  background: var(--red); color: #fff;
  font-family: 'Rajdhani', sans-serif; font-weight: 700;
  font-size: 0.75rem; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 3px; text-transform: uppercase;
}
.news-list-body { padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; }
.news-list-body h3 { font-size: 1.15rem; margin-bottom: 8px; line-height: 1.3; transition: color 0.2s; }
.news-list-item:hover .news-list-body h3 { color: var(--red); }
.news-list-body p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.6; }

/* ---------- Filter Bar ---------- */
.filter-bar { display: flex; gap: 8px; padding: 24px 0; flex-wrap: wrap; }
.filter-btn {
  font-family: 'Rajdhani', sans-serif; font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 9px 20px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all 0.2s; color: var(--text-secondary);
}
.filter-btn:hover { border-color: rgba(225,6,0,0.4); color: var(--red); background: rgba(225,6,0,0.06); }
.filter-btn.active { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 4px 16px rgba(225,6,0,0.35); }

/* ---------- Standings Tables ---------- */
.standings-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.standings-table { font-size: 0.9rem; }
.standings-table th {
  font-family: 'Rajdhani', sans-serif; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); padding: 12px 14px;
  text-align: left; border-bottom: 2px solid var(--border);
}
.standings-table td { padding: 11px 14px; border-bottom: 1px solid var(--border-light); }
.standings-table tr:nth-child(even) { background: var(--table-stripe); }
.standings-table tr:hover { background: rgba(225,6,0,0.04); }
.standings-table td:first-child { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.1rem; width: 44px; color: var(--text-muted); }
.standings-table tr:first-child td:first-child { color: var(--red); }
.standings-table.full { font-size: 0.95rem; }
.standings-table.full td { padding: 13px 18px; }
.td-pts { font-family: 'Rajdhani', sans-serif; font-weight: 700; color: var(--red); font-size: 1rem; }

/* ---------- Results ---------- */
.result-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-bottom: 24px; }
.result-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 24px 28px; border-bottom: 1px solid var(--border);
  background: linear-gradient(to right, rgba(225,6,0,0.05), transparent);
}
.result-header h2 { font-size: 1.4rem; }
.result-circuit { font-size: 0.85rem; color: var(--text-secondary); margin-top: 2px; }
.result-round { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; background: var(--tag-bg); color: var(--text-secondary); padding: 5px 12px; border-radius: 6px; }
.results-table th { font-family: 'Rajdhani', sans-serif; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); padding: 12px 18px; text-align: left; border-bottom: 2px solid var(--border); }
.results-table td { padding: 11px 18px; border-bottom: 1px solid var(--border-light); font-size: 0.9rem; }
.results-table tr:nth-child(even) { background: var(--table-stripe); }
.results-table tr:hover { background: rgba(225,6,0,0.03); }
.result-source { padding: 12px 28px; border-top: 1px solid var(--border); }
.result-source .source { font-size: 0.8rem; color: var(--text-muted); }

/* ---------- Rumors ---------- */
.rumors-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rumor-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px; border-left: 4px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.rumor-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--shadow); }
.rumor-card.confirmed { border-left-color: var(--green); }
.rumor-card.rumor { border-left-color: var(--amber); }
.rumor-badge { font-family: 'Rajdhani', sans-serif; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; padding: 4px 10px; border-radius: 4px; display: inline-block; margin-bottom: 12px; }
.rumor-badge.confirmed { background: rgba(22,163,74,0.12); color: var(--green); }
.rumor-badge.rumor { background: rgba(217,119,6,0.12); color: var(--amber); }
.rumor-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.rumor-card p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.6; }
.rumor-card .source { font-size: 0.78rem; color: var(--text-muted); }

/* ---------- Social ---------- */
.social-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.social-card {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 24px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--bg-card);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; font-weight: 500; font-size: 0.95rem;
}
.social-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px var(--shadow); }
.social-card.instagram:hover { border-color: #E4405F; color: #E4405F; }
.social-card.tiktok:hover { border-color: #00f2ea; color: #00f2ea; }
.social-card.twitter:hover { border-color: rgba(255,255,255,0.3); }

/* ---------- Page Hero ---------- */
.page-hero { background: var(--page-hero-gradient); padding: 56px 0; color: #fff; position: relative; overflow: hidden; }
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -55deg, transparent 0, transparent 60px,
    rgba(255,255,255,0.012) 60px, rgba(255,255,255,0.012) 61px
  );
}
.page-hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--red) 30%, var(--red) 70%, transparent 100%);
}
.page-hero h1 { font-size: 3rem; margin-bottom: 10px; position: relative; }
.page-hero p { color: rgba(255,255,255,0.6); font-size: 1.1rem; position: relative; }

/* ---------- Predictions ---------- */
.pred-login-prompt { padding: 80px 0; }
.empty-state { text-align: center; padding: 48px; }
.empty-icon { display: flex; justify-content: center; margin-bottom: 20px; color: var(--text-muted); }
.empty-state h3 { font-size: 1.6rem; margin-bottom: 10px; }
.empty-state p { color: var(--text-secondary); margin-bottom: 24px; max-width: 400px; margin-left: auto; margin-right: auto; font-size: 0.95rem; }

.pred-section { padding: 24px 0 48px; }
.pred-race-selector {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px; margin-bottom: 24px; text-align: center;
  background-image: linear-gradient(to right, rgba(225,6,0,0.04), transparent, rgba(225,6,0,0.04));
}
.pred-race-selector h2 { font-size: 1.8rem; margin-bottom: 6px; }
.pred-race-selector p { color: var(--text-secondary); font-size: 0.95rem; }
.pred-deadline { margin-top: 14px; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--amber); }
.pred-deadline.open { color: var(--green); }
.pred-deadline.closed { color: var(--red); }

.pred-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 32px; }
.pred-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 28px; }
.pred-field label { display: block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 8px; }
.pred-pts { color: var(--red); font-weight: 700; }
.pred-field select {
  width: 100%; padding: 13px 16px; border-radius: 10px;
  border: 1.5px solid var(--input-border); background: var(--input-bg);
  outline: none; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.pred-field select:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-glow); }

.pred-scoring-info { background: var(--bg-secondary); border-radius: 12px; padding: 18px 22px; margin-bottom: 24px; border: 1px solid var(--border); }
.pred-scoring-info h4 { font-size: 0.9rem; margin-bottom: 12px; color: var(--text-secondary); }
.scoring-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; font-size: 0.875rem; color: var(--text-secondary); }
.scoring-grid strong { color: var(--red); }
.scoring-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 10px; }

.pred-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pred-status { font-size: 0.875rem; color: var(--green); font-weight: 600; }
.pred-current { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 28px; margin-top: 20px; }
.pred-current h3 { font-size: 1.2rem; margin-bottom: 16px; }
.pred-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.pred-detail-item { background: var(--bg-secondary); border-radius: 10px; padding: 14px; }
.pred-detail-item .pred-detail-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 6px; }
.pred-detail-item .pred-detail-value { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.05rem; }

/* Leaderboard */
.leaderboard-tabs { display: flex; gap: 8px; margin-bottom: 28px; }
.lb-tab { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 9px 18px; border-radius: 10px; background: var(--bg-card); border: 1px solid var(--border); transition: all 0.2s; }
.lb-tab:hover { border-color: rgba(225,6,0,0.4); color: var(--red); }
.lb-tab.active { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 4px 16px rgba(225,6,0,0.35); }

.leaderboard-podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 36px; }
.podium-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px; text-align: center;
  position: relative; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.podium-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px var(--shadow-lg); }
.podium-card.gold { border-top: 4px solid #FFD700; }
.podium-card.silver { border-top: 4px solid #C0C0C0; }
.podium-card.bronze { border-top: 4px solid #CD7F32; }
.podium-card.gold::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at top, rgba(255,215,0,0.06), transparent 70%); }
.podium-rank { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 3rem; opacity: 0.1; position: absolute; top: 8px; right: 16px; line-height: 1; }
.podium-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.3rem;
  margin: 0 auto 12px; box-shadow: 0 4px 16px rgba(225,6,0,0.4);
}
.podium-card.gold .podium-avatar { background: #FFD700; color: #000; box-shadow: 0 4px 16px rgba(255,215,0,0.4); }
.podium-card.silver .podium-avatar { background: #C0C0C0; color: #000; box-shadow: 0 4px 16px rgba(192,192,192,0.35); }
.podium-card.bronze .podium-avatar { background: #CD7F32; color: #fff; box-shadow: 0 4px 16px rgba(205,127,50,0.35); }
.podium-name { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.15rem; }
.podium-score { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.6rem; color: var(--red); margin-top: 6px; }
.podium-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* Prediction History */
.history-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 22px; margin-bottom: 16px; }
.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.history-header h4 { font-size: 1.1rem; }
.history-score { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.4rem; color: var(--red); }
.history-score span { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }

/* ---------- Profile Page ---------- */
.profile-grid { display: flex; flex-direction: column; gap: 20px; padding: 40px 0; }
.profile-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 28px; }
.profile-card h3 { font-size: 1.2rem; margin-bottom: 20px; }
.profile-header { display: flex; align-items: center; gap: 24px; margin-bottom: 28px; }
.profile-avatar {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.9rem; flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(225,6,0,0.4);
}
.profile-info h2 { font-size: 1.7rem; margin-bottom: 4px; }
.profile-email { font-size: 0.875rem; color: var(--text-muted); display: block; }
.profile-since { font-size: 0.8rem; color: var(--text-muted); display: block; margin-top: 2px; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.profile-stat { text-align: center; padding: 20px 16px; border-radius: 12px; background: var(--bg-secondary); border: 1px solid var(--border); }
.profile-stat strong { display: block; font-family: 'Rajdhani', sans-serif; font-size: 1.8rem; font-weight: 700; color: var(--red); }
.profile-stat span { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; display: block; }
.rank-evolution { min-height: 80px; }

/* ---------- Drivers Grid ---------- */
.drivers-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 40px 0; }
.driver-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out; cursor: pointer;
}
.driver-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px var(--shadow-lg); }
.driver-card-header { height: 110px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.driver-card-header::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 40%; background: linear-gradient(to top, rgba(0,0,0,0.4), transparent); }
.driver-card-number { font-size: 4.5rem; font-family: 'Rajdhani', sans-serif; font-weight: 700; color: rgba(255,255,255,0.18); position: relative; z-index: 1; }
.driver-card-body { padding: 18px; }
.driver-card-body h3 { font-size: 1.15rem; margin-bottom: 4px; }
.driver-card-body .driver-team { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 14px; }
.driver-stats { display: flex; gap: 20px; }
.driver-stat { display: flex; flex-direction: column; font-size: 0.78rem; color: var(--text-muted); }
.driver-stat strong { font-family: 'Rajdhani', sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }

/* ---------- Teams Grid ---------- */
.teams-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; padding: 40px 0; }
.team-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: transform 0.25s ease-out, box-shadow 0.25s ease-out; }
.team-card:hover { transform: translateY(-5px); box-shadow: 0 16px 48px var(--shadow-lg); }
.team-card-header { padding: 24px 28px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.team-card-header h3 { font-size: 1.4rem; }
.team-badge { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 12px; border-radius: 6px; }
.team-card-body { padding: 24px 28px; }
.team-drivers { display: flex; gap: 24px; margin-bottom: 18px; }
.team-driver-info { flex: 1; }
.team-driver-info span { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.team-driver-info p { font-weight: 600; font-size: 1rem; margin-top: 2px; }
.team-stats-row { display: flex; gap: 28px; }
.team-stat { display: flex; flex-direction: column; font-size: 0.78rem; color: var(--text-muted); }
.team-stat strong { font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--red); }

/* ---------- Calendar Grid ---------- */
.calendar-grid { display: flex; flex-direction: column; gap: 10px; padding: 40px 0; }
.calendar-item {
  display: grid; grid-template-columns: 72px 1fr auto;
  gap: 20px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 24px; align-items: center;
  transition: transform 0.2s ease-out, border-color 0.2s;
}
.calendar-item:hover { transform: translateX(5px); border-color: rgba(225,6,0,0.2); }
.calendar-item.past { opacity: 0.45; }
.calendar-item.next {
  border-color: var(--red);
  box-shadow: 0 0 28px var(--red-glow), inset 0 0 24px rgba(225,6,0,0.03);
  background: linear-gradient(to right, rgba(225,6,0,0.07), var(--bg-card));
}
.calendar-round { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.6rem; text-align: center; color: var(--text-muted); line-height: 1; }
.calendar-item.next .calendar-round { color: var(--red); }
.calendar-info h3 { font-size: 1.05rem; }
.calendar-info .calendar-circuit { font-size: 0.875rem; color: var(--text-secondary); margin-top: 2px; }
.calendar-date { text-align: right; font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 1rem; color: var(--text-secondary); }
.calendar-item.next .calendar-date { color: var(--red); font-weight: 700; }
.calendar-weather { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ---------- Analysis Grid ---------- */
.analysis-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; padding-bottom: 48px; }
.analysis-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out, border-color 0.2s;
  cursor: pointer; position: relative; overflow: hidden;
}
.analysis-card::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
  background: var(--red); transform: scaleY(0); transform-origin: bottom; transition: transform 0.25s ease-out;
}
.analysis-card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px var(--shadow-lg); border-color: rgba(225,6,0,0.15); }
.analysis-card:hover::before { transform: scaleY(1); }
.analysis-tag { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
.analysis-card h3 { font-size: 1.25rem; margin-bottom: 10px; transition: color 0.2s; }
.analysis-card:hover h3 { color: var(--red); }
.analysis-card p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.65; }

/* ---------- Page visibility ---------- */
.page { display: none; }
.page.active { display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 56px 0 28px; position: relative; }
.site-footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--red) 30%, var(--red) 70%, transparent 100%);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
.footer-logo { margin-bottom: 14px; font-family: 'Rajdhani', sans-serif; font-size: 1.4rem; font-weight: 700; }
.footer-col p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.7; }
.footer-col h4 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; color: var(--text-muted); }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { font-size: 0.9rem; color: var(--text-secondary); transition: color 0.2s, padding-left 0.2s; }
.footer-col ul a:hover { color: var(--red); padding-left: 4px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; text-align: center; }
.footer-bottom p { font-size: 0.82rem; color: var(--text-muted); }
.disclaimer { font-size: 0.72rem !important; margin-top: 6px; }

/* ---------- Notification ---------- */
.notification { position: fixed; bottom: 28px; right: 28px; z-index: 3000; transform: translateY(140px); transition: transform 0.45s cubic-bezier(0.16,1,0.3,1); }
.notification.active { transform: translateY(0); }
.notification-content {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--red);
  border-radius: 14px; padding: 16px 20px;
  box-shadow: 0 12px 50px var(--shadow-xl), 0 0 0 1px rgba(225,6,0,0.1);
  max-width: 380px;
}
.notification-icon { font-size: 1.2rem; }
.notification-text { font-size: 0.875rem; flex: 1; }
.notification-close { font-size: 1.2rem; color: var(--text-muted); padding: 4px; transition: color 0.2s; }
.notification-close:hover { color: var(--text-primary); }

/* ---------- Team Colors ---------- */
.driver-card-header.red-bull    { background: linear-gradient(135deg, #111c36 0%, #1f4a9a 100%); }
.driver-card-header.ferrari     { background: linear-gradient(135deg, #6b0000 0%, #e8002d 100%); }
.driver-card-header.mclaren     { background: linear-gradient(135deg, #4d2600 0%, #ff8000 100%); }
.driver-card-header.mercedes    { background: linear-gradient(135deg, #082e26 0%, #1ac8a8 100%); }
.driver-card-header.aston-martin{ background: linear-gradient(135deg, #07281e 0%, #1a7a58 100%); }
.driver-card-header.alpine      { background: linear-gradient(135deg, #4a1838 0%, #ff6aaa 100%); }
.driver-card-header.williams    { background: linear-gradient(135deg, #0e2540 0%, #4aaede 100%); }
.driver-card-header.rb          { background: linear-gradient(135deg, #1a2050 0%, #5278e8 100%); }
.driver-card-header.audi        { background: linear-gradient(135deg, #0a0a0a 0%, #3a3a3a 100%); }
.driver-card-header.haas        { background: linear-gradient(135deg, #282828 0%, #9ca0a3 100%); }
.driver-card-header.cadillac    { background: linear-gradient(135deg, #05101e 0%, #1a3c72 100%); }
.team-card-header.red-bull      { border-left: 4px solid #3671C6; }
.team-card-header.ferrari       { border-left: 4px solid #E8002D; }
.team-card-header.mclaren       { border-left: 4px solid #FF8000; }
.team-card-header.mercedes      { border-left: 4px solid #27F4D2; }
.team-card-header.aston-martin  { border-left: 4px solid #229971; }
.team-card-header.alpine        { border-left: 4px solid #FF87BC; }
.team-card-header.williams      { border-left: 4px solid #64C4FF; }
.team-card-header.rb            { border-left: 4px solid #6692FF; }
.team-card-header.audi          { border-left: 4px solid #b0b0b0; }
.team-card-header.haas          { border-left: 4px solid #B6BABD; }
.team-card-header.cadillac      { border-left: 4px solid #2a5fc0; }

/* Calendar sprint badge */
.calendar-sprint-badge {
  display: inline-block;
  font-family: 'Rajdhani', sans-serif; font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  background: rgba(225,6,0,0.12); color: var(--red);
  border: 1px solid rgba(225,6,0,0.3);
  padding: 2px 7px; border-radius: 3px; margin-left: 8px;
  vertical-align: middle;
}

/* ---------- Category Colors ---------- */
.news-card[data-category="reglement"] .card-tag,
.news-list-item[data-category="reglement"] .card-tag { background: #2563eb; box-shadow: 0 2px 10px rgba(37,99,235,0.5); }
.news-card[data-category="transferts"] .card-tag,
.news-list-item[data-category="transferts"] .card-tag { background: #d97706; box-shadow: 0 2px 10px rgba(217,119,6,0.5); }
.news-card[data-category="technique"] .card-tag,
.news-list-item[data-category="technique"] .card-tag { background: #0891b2; box-shadow: 0 2px 10px rgba(8,145,178,0.5); }

.news-card[data-category="reglement"] .news-card-image,
.news-list-item[data-category="reglement"] .news-list-image {
  background: linear-gradient(135deg, #050a1e 0%, #0d1f4a 55%, #060f2c 100%);
}
.news-card[data-category="reglement"] .news-card-image::after,
.news-list-item[data-category="reglement"] .news-list-image::after {
  background: linear-gradient(to top, rgba(37,99,235,0.3), transparent);
}
.news-card[data-category="transferts"] .news-card-image,
.news-list-item[data-category="transferts"] .news-list-image {
  background: linear-gradient(135deg, #140800 0%, #3a1c00 55%, #1a0c00 100%);
}
.news-card[data-category="transferts"] .news-card-image::after,
.news-list-item[data-category="transferts"] .news-list-image::after {
  background: linear-gradient(to top, rgba(217,119,6,0.3), transparent);
}
.news-card[data-category="technique"] .news-card-image,
.news-list-item[data-category="technique"] .news-list-image {
  background: linear-gradient(135deg, #001212 0%, #002c2c 55%, #001a1a 100%);
}
.news-card[data-category="technique"] .news-card-image::after,
.news-list-item[data-category="technique"] .news-list-image::after {
  background: linear-gradient(to top, rgba(8,145,178,0.3), transparent);
}

/* ---------- Driver Card Enhancements ---------- */
.driver-card-header::before {
  content: ''; position: absolute; top: 0; right: -8px;
  width: 45%; height: 100%;
  background: rgba(255,255,255,0.05);
  transform: skewX(-14deg); pointer-events: none;
}
.driver-flag { font-size: 0.85rem; vertical-align: middle; margin-left: 2px; }
.driver-nat { font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.04em; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; }
  .standings-preview { grid-template-columns: 1fr; gap: 24px; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .drivers-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .leaderboard-podium { grid-template-columns: 1fr 1fr 1fr; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--header-bg); flex-direction: column; padding: 12px 20px;
    border-bottom: 1px solid var(--border); backdrop-filter: blur(24px);
  }
  .nav-links.active { display: flex; }
  .mobile-menu-btn { display: flex; }
  .user-name-short { display: none; }
  .hero-main h1 { font-size: 1.9rem; }
  .hero-side { flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid .stat-item:nth-child(2n) { border-right: none; }
  .stats-grid .stat-item:nth-child(1),
  .stats-grid .stat-item:nth-child(2) { border-bottom: 1px solid var(--border); }
  .news-grid { grid-template-columns: 1fr; }
  .news-card.featured { display: block; grid-column: 1; }
  .news-card.featured .news-card-image { height: 200px; min-height: 200px; }
  .news-card.featured .news-card-body { padding: 20px; }
  .news-list-item { grid-template-columns: 1fr; }
  .news-list-image { min-height: 120px; }
  .rumors-grid { grid-template-columns: 1fr; }
  .social-grid { grid-template-columns: 1fr; }
  .drivers-grid { grid-template-columns: repeat(2, 1fr); }
  .teams-grid { grid-template-columns: 1fr; }
  .analysis-grid { grid-template-columns: 1fr; }
  .calendar-item { grid-template-columns: 50px 1fr; }
  .calendar-date { grid-column: 2; text-align: left; }
  .footer-grid { grid-template-columns: 1fr; }
  .page-hero h1 { font-size: 2.2rem; }
  .leaderboard-podium { grid-template-columns: 1fr; }
  .pred-form-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .modal { padding: 28px; margin: 10px; }
  .modal-article { padding: 28px; }
  .section { padding: 40px 0; }
  /* Tables scrollables sur mobile */
  .standings-table.full,
  .results-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Section header compacte */
  .section-header { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 480px) {
  .hero-main { padding: 24px; }
  .hero-main h1 { font-size: 1.5rem; }
  .drivers-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: 1fr 1fr; }
  .page-hero h1 { font-size: 1.8rem; }
}

/* ---------- Animations ---------- */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ---------- Countdown ---------- */
.countdown-mini {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.05em;
  margin-top: 4px;
  line-height: 1;
}

.calendar-countdown {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red);
  margin-top: 6px;
  letter-spacing: 0.04em;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
