/* ═══════════════════════════════════════════════════════════
   PADDOCKINTEL HUB — styles.css (Apple Sandblasted Master UI)
   Main Dashboard & Interactive World Map Style
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg-apple: #f5f5f7;
    --card-sandblasted: rgba(255, 255, 255, 0.65);
    --card-border: rgba(255, 255, 255, 0.8);
    --text-charcoal: #1d1d1f;
    --text-muted: #86868b;
    --f1-red: #e10600;
    --apple-blue: #0066cc;
    
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-apple);
    color: var(--text-charcoal);
    font-family: var(--font-sans);
    background-image: 
        radial-gradient(circle at 100% 0%, rgba(0, 102, 204, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(225, 6, 0, 0.02) 0%, transparent 45%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    padding: 24px;
}

/* Contenedor Maestro */
.app-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ═══ SITE HEADER ═════════════════════════════════════════ */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: var(--card-sandblasted);
    backdrop-filter: blur(30px) saturate(190%);
    -webkit-backdrop-filter: blur(30px) saturate(190%);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-badge {
    background: var(--text-charcoal);
    color: #fff;
    font-family: var(--font-sans);
    font-weight: 800;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    letter-spacing: -0.02em;
}

.logo-text {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
}
.logo-text span { color: var(--f1-red); }
.logo-sub { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; margin-top: 1px; }

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Selector de Idiomas Premium */
.lang-selector {
    display: flex;
    background: rgba(0,0,0,0.04);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.01);
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: #fff;
    color: var(--text-charcoal);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-nav-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-charcoal);
    text-decoration: none;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    background: rgba(0,0,0,0.04);
    padding: 6px 12px;
    border-radius: 20px;
}
.live-dot { width: 6px; height: 6px; background: #00875a; border-radius: 50%; }

.season-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

/* ═══ TICKER BAR ═════════════════════════════════════════ */
.ticker-bar {
    background: #1d1d1f;
    color: #fff;
    padding: 10px 0;
    border-radius: 12px;
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 11px;
}
.ticker-inner {
    display: flex;
    white-space: nowrap;
    gap: 40px;
    padding-left: 24px;
}
.highlight { color: #ffb700; font-weight: 700; }

/* ═══ DASHBOARD GRID ═════════════════════════════════════ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
}

@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

/* Cristal Grabado de la Portada */
.glass-card {
    background: var(--card-sandblasted);
    backdrop-filter: blur(35px) saturate(190%);
    -webkit-backdrop-filter: blur(35px) saturate(190%);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

/* Contenedor del Mapa */
.map-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 640px;
}

.map-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-card-title { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }

#world-map {
    flex-grow: 1;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.05);
    z-index: 1;
}

/* Forzar estilo Apple minimalista dentro del mapa Leaflet */
.leaflet-container { background: #f5f5f7 !important; }
.circuit-tooltip {
    background: rgba(255,255,255,0.9) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.06) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    color: #1d1d1f !important;
    border-radius: 8px !important;
    padding: 10px !important;
    font-family: var(--font-sans);
}

/* Pines del Mapa estilo Apple */
.circ-pin {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1d1d1f;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.circ-pin.circ-next { background: var(--f1-red); }
.circ-pin.circ-done { background: var(--text-muted); opacity: 0.7; }

/* ═══ SIDEBAR & CLASIFICACIONES ══════════════════════════ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding-bottom: 12px;
}
.sidebar-card-title { font-weight: 700; font-size: 15px; color: var(--text-charcoal); }

.section-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(0,0,0,0.04);
    color: var(--text-muted);
}

/* Filas de Pilotos en el Campeonato */
.sb-driver-row, .sb-constructor-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.sb-driver-row:hover, .sb-constructor-row:hover {
    background: rgba(0,0,0,0.02);
}

.sb-pos {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 13px;
    min-width: 20px;
    color: var(--text-muted);
}
.sb-pos.pos-1 { color: #bf7f3c; }

.sb-color-bar {
    width: 3px;
    height: 24px;
    border-radius: 2px;
}

.sb-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.sb-name { font-size: 13.5px; font-weight: 600; color: var(--text-charcoal); }
.sb-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.sb-pts {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 13px;
}

/* Barra de progreso de constructores estilo Apple */
.sb-color-dot { width: 8px; height: 8px; border-radius: 50%; }
.sb-bar-wrap { background: rgba(0,0,0,0.03); height: 4px; border-radius: 2px; width: 100%; margin-top: 4px; }
.sb-bar { height: 100%; border-radius: 2px; }

/* ═══ SITE FOOTER ═════════════════════════════════════════ */
.site-footer {
    background: var(--card-sandblasted);
    border: 1px solid var(--card-border);
    padding: 20px;
    border-radius: 16px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.footer-link { color: var(--text-charcoal); text-decoration: none; font-weight: 600; }