/* ==========================================================================
   NFSRANKSMW - DESIGN SYSTEM: PRO ESPORTS (lokal.gg) + FORMULA 1 (f1.com)
   Estilo visual de competición con acentos de neón iluminados y fibra de carbono.
   ========================================================================== */

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

:root {
    /* Paleta Base Carbono & Obsidiana */
    --bg-carbon: #07080a;
    --bg-surface: #0f1116;
    --bg-surface-elevated: #151821;
    --bg-panel: rgba(16, 19, 26, 0.88);
    --bg-card: rgba(21, 25, 35, 0.75);

    /* Acentos Neón Iluminados */
    --nfs-orange: #ff7700;
    --nfs-orange-bright: #ff8c1a;
    --nfs-orange-glow: 0 0 14px rgba(255, 119, 0, 0.8), 0 0 28px rgba(255, 119, 0, 0.35);
    --nfs-subtle-glow: 0 0 8px rgba(255, 119, 0, 0.45);
    
    /* Acentos Fórmula 1 & Competición */
    --f1-red: #e10600;
    --cyan-electric: #00f0ff;
    --cyan-glow: 0 0 14px rgba(0, 240, 255, 0.7);
    --green-neon: #00ff88;
    --green-glow: 0 0 12px rgba(0, 255, 136, 0.6);

    /* Trofeos & Podios (lokal.gg) */
    --gold: #ffd700;
    --gold-glow: 0 0 22px rgba(255, 215, 0, 0.45);
    --silver: #e2e8f0;
    --silver-glow: 0 0 18px rgba(226, 232, 240, 0.35);
    --bronze: #ff9f43;
    --bronze-glow: 0 0 18px rgba(255, 159, 67, 0.4);

    /* Tipografías */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dimmed: #64748b;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-active: rgba(255, 119, 0, 0.5);

    --font-racing: 'Rajdhani', -apple-system, sans-serif;
    --font-ui: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-carbon);
    color: var(--text-main);
    font-family: var(--font-ui);
    margin: 0;
    padding: 0;
    /* Textura F1 Speedlines + Fondo degradado motorsport */
    background-image: 
        repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.012) 0px, rgba(255, 255, 255, 0.012) 2px, transparent 2px, transparent 12px),
        radial-gradient(circle at 50% 0%, rgba(255, 119, 0, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 80% 30%, rgba(0, 240, 255, 0.04) 0%, transparent 50%),
        linear-gradient(180deg, #07080a 0%, #0c0e14 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ==========================================================================
   HEADER CON ESTILO FÓRMULA 1 (f1.com)
   ========================================================================== */
header {
    background-color: rgba(10, 12, 16, 0.95);
    backdrop-filter: blur(14px);
    border-bottom: 2px solid var(--border-subtle);
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.015) 0px, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 8px);
}

.logo {
    display: flex;
    align-items: center;
    font-family: var(--font-racing);
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.logo span.highlight {
    color: var(--nfs-orange);
    text-shadow: var(--nfs-orange-glow);
    margin-left: 6px;
}

.logo img {
    height: 46px;
    vertical-align: middle;
    margin-right: 14px;
    filter: drop-shadow(0 0 8px rgba(255, 119, 0, 0.5));
}

/* Telemetría F1 en tiempo real */
.header-telemetry {
    display: none;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
}

@media (min-width: 1100px) {
    .header-telemetry { display: flex; }
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--green-neon);
    box-shadow: var(--green-glow);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.15); }
    100% { opacity: 0.4; transform: scale(0.9); }
}

.menu-toggle { 
    display: none; 
    font-size: 24px; 
    cursor: pointer; 
    color: var(--nfs-orange); 
    user-select: none;
    transition: transform 0.2s;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

nav {
    display: flex;
    align-items: center;
    height: 100%;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-racing);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1px;
    padding: 0 14px;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    transition: all 0.25s ease;
}

nav a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Barra inferior activa estilo F1 / lokal.gg */
nav a.active {
    color: #ffffff;
    font-weight: 800;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--nfs-orange);
    box-shadow: 0 0 12px var(--nfs-orange), 0 0 20px var(--nfs-orange);
    border-radius: 3px 3px 0 0;
}

@media (max-width: 992px) {
    .menu-toggle { display: block; }
    nav { 
        display: none; 
        flex-direction: column; 
        position: absolute; 
        top: 70px; 
        right: 0; 
        background: rgba(10, 12, 16, 0.98); 
        width: 100%; 
        height: auto;
        text-align: center; 
        border-bottom: 2px solid var(--nfs-orange); 
        padding: 15px 0; 
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(20px);
    }
    nav.open { display: flex; }
    nav a { 
        margin: 6px 0; 
        padding: 12px 0;
        width: 100%;
        justify-content: center;
        font-size: 16px;
    }
    nav a.active::after {
        bottom: 0;
        left: 30%;
        width: 40%;
    }
}

/* ==========================================================================
   HERO BANNER MOTORSPORT & FÓRMULA 1
   ========================================================================== */
.hero-banner {
    position: relative;
    width: 100%;
    height: 440px;
    background: linear-gradient(90deg, rgba(7, 8, 10, 0.95) 0%, rgba(7, 8, 10, 0.75) 45%, rgba(7, 8, 10, 0.3) 100%), 
                url('../img/bmw-m3-gtr.jpg') no-repeat center right / cover;
    display: flex;
    align-items: center;
    padding-left: 25px;
    border-bottom: 2px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--nfs-orange);
    box-shadow: var(--nfs-orange-glow);
}

@media (min-width: 768px) {
    .hero-banner { 
        height: 500px; 
        padding-left: 70px; 
    }
}

.hero-banner-content {
    max-width: 720px;
    z-index: 2;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-racing);
    font-size: 13px;
    font-weight: 800;
    color: var(--nfs-orange);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    background: rgba(255, 119, 0, 0.1);
    border: 1px solid rgba(255, 119, 0, 0.3);
    padding: 4px 12px;
    border-radius: 4px;
    text-shadow: var(--nfs-subtle-glow);
}

.hero-banner-content h1 {
    font-family: var(--font-racing);
    font-size: 38px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.05;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 1.5px;
}

.hero-banner-content h1 span.glow-text {
    color: var(--nfs-orange);
    text-shadow: var(--nfs-orange-glow);
}

@media (min-width: 768px) {
    .hero-banner-content h1 { font-size: 56px; }
}

.hero-btn-container {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-explored {
    background: linear-gradient(135deg, var(--nfs-orange) 0%, #d45500 100%);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    font-family: var(--font-racing);
    font-size: 16px;
    font-weight: 800;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(255, 119, 0, 0.4);
}

.btn-explored:hover {
    background: linear-gradient(135deg, #ff8c1a 0%, var(--nfs-orange) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 119, 0, 0.7);
}

.drivers-banner {
    position: relative;
    width: 100%;
    height: 280px;
    background: linear-gradient(rgba(8, 10, 15, 0.82), rgba(8, 10, 15, 0.95)), 
                url('https://images.unsplash.com/photo-1503376780353-7e6692767b70?auto=format&fit=crop&w=1400&q=80') no-repeat center center / cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-bottom: 2px solid var(--border-subtle);
    padding: 0 15px;
}

.drivers-banner h2 {
    font-family: var(--font-racing);
    font-size: 42px;
    font-weight: 900;
    color: #ffffff;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 3px;
}

.drivers-banner h3 {
    font-family: var(--font-racing);
    font-size: 32px;
    font-weight: 800;
    color: var(--nfs-orange);
    text-transform: uppercase;
    margin: 4px 0 0 0;
    letter-spacing: 2px;
    text-shadow: var(--nfs-orange-glow);
}

@media (min-width: 768px) {
    .drivers-banner h2 { font-size: 54px; }
    .drivers-banner h3 { font-size: 40px; }
}

/* ==========================================================================
   SECCIONES Y CONTENEDORES
   ========================================================================== */
.view-section {
    display: none;
    padding: 30px 15px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 768px) {
    .view-section { padding: 40px 20px; }
}

.view-section.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.about-section {
    background: var(--bg-surface);
    padding: 35px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
}

.about-section h2 { 
    font-family: var(--font-racing);
    color: var(--nfs-orange); 
    margin-bottom: 12px; 
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: var(--nfs-subtle-glow);
}

.about-section p { 
    max-width: 840px; 
    margin: 0 auto; 
    color: var(--text-muted); 
    line-height: 1.7; 
    font-size: 15px;
}

h2.section-title {
    font-family: var(--font-racing);
    color: #ffffff;
    text-transform: uppercase;
    border-left: 4px solid var(--nfs-orange);
    padding-left: 14px;
    margin-bottom: 24px;
    letter-spacing: 1.5px;
    font-size: 26px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

h2.section-title span.glow {
    color: var(--nfs-orange);
    text-shadow: var(--nfs-subtle-glow);
}

/* ==========================================================================
   COMPONENTE: TOP 3 PODIUM CARDS (Inspirado en lokal.gg Ref. 1)
   ========================================================================== */
.podium-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .podium-grid {
        grid-template-columns: repeat(3, 1fr);
        align-items: end;
    }
}

.podium-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 24px 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.podium-card:hover {
    transform: translateY(-4px);
}

/* Oro - 1er Lugar (Centro destacado) */
.podium-card.rank-1 {
    border-color: rgba(255, 215, 0, 0.4);
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.08) 0%, rgba(16, 19, 26, 0.95) 100%);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.15);
}

@media (min-width: 768px) {
    .podium-card.rank-1 {
        order: 2;
        padding: 30px 22px;
        transform: translateY(-8px);
    }
    .podium-card.rank-1:hover {
        transform: translateY(-12px);
    }
    .podium-card.rank-2 { order: 1; }
    .podium-card.rank-3 { order: 3; }
}

.podium-card.rank-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    box-shadow: var(--gold-glow);
}

/* Plata - 2do Lugar */
.podium-card.rank-2 {
    border-color: rgba(226, 232, 240, 0.3);
    background: linear-gradient(180deg, rgba(226, 232, 240, 0.05) 0%, rgba(16, 19, 26, 0.95) 100%);
    box-shadow: 0 10px 30px rgba(226, 232, 240, 0.1);
}

.podium-card.rank-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #e2e8f0;
    box-shadow: var(--silver-glow);
}

/* Bronce - 3er Lugar */
.podium-card.rank-3 {
    border-color: rgba(255, 159, 67, 0.3);
    background: linear-gradient(180deg, rgba(255, 159, 67, 0.05) 0%, rgba(16, 19, 26, 0.95) 100%);
    box-shadow: 0 10px 30px rgba(255, 159, 67, 0.1);
}

.podium-card.rank-3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #ff9f43;
    box-shadow: var(--bronze-glow);
}

.podium-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.podium-avatar-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.podium-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #1e2433;
    border: 2px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.rank-1 .podium-avatar {
    border-color: #ffd700;
    box-shadow: var(--gold-glow);
}
.rank-2 .podium-avatar {
    border-color: #e2e8f0;
    box-shadow: var(--silver-glow);
}
.rank-3 .podium-avatar {
    border-color: #ff9f43;
    box-shadow: var(--bronze-glow);
}

.podium-trophy {
    font-size: 32px;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

.podium-driver-info h4 {
    font-family: var(--font-racing);
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.podium-badge-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-top: 3px;
}

.rank-1 .podium-badge-label { color: #ffd700; }
.rank-2 .podium-badge-label { color: #e2e8f0; }
.rank-3 .podium-badge-label { color: #ff9f43; }

.podium-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.podium-time-val {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 800;
    color: var(--nfs-orange);
    text-shadow: var(--nfs-subtle-glow);
}

.podium-metric-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   ESTADÍSTICAS TELEMETRÍA (BARRA SUPERIOR DE RUTAS)
   ========================================================================== */
.leaderboard-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 25px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: var(--border-subtle);
}

.stat-icon {
    font-size: 22px;
    color: var(--nfs-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 6px rgba(255, 119, 0, 0.6));
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-family: var(--font-racing);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   CONTROLES & FILTROS (Pills estilo eSports / F1)
   ========================================================================== */
.controls-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

@media (min-width: 768px) {
    .controls-wrapper {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.search-input {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-ui);
    width: 100%;
    outline: none;
    transition: all 0.3s;
}

@media (min-width: 768px) {
    .search-input { max-width: 320px; }
}

.search-input:focus {
    border-color: var(--nfs-orange);
    box-shadow: 0 0 12px rgba(255, 119, 0, 0.35);
    background-color: var(--bg-surface-elevated);
}

.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-surface);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-racing);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
}

.filter-btn:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--bg-surface-elevated);
}

.filter-btn.active {
    background: var(--nfs-orange);
    color: #07080a;
    border-color: var(--nfs-orange);
    font-weight: 800;
    box-shadow: var(--nfs-orange-glow);
}

/* ==========================================================================
   GRID DE RUTAS (F1 Telemetry Cards)
   ========================================================================== */
.routes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .routes-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
    .routes-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1250px) {
    .routes-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
}

.route-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 16px 18px;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.route-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--cyan-electric);
    box-shadow: var(--cyan-glow);
    transition: all 0.3s;
}

.route-card:hover {
    border-color: var(--nfs-orange);
    transform: translateY(-3px);
    background: var(--bg-surface-elevated);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 119, 0, 0.25);
}

.route-card:hover::before {
    background: var(--nfs-orange);
    box-shadow: var(--nfs-orange-glow);
}

.route-icon-container {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.route-icon-box {
    background: rgba(10, 12, 18, 0.95);
    border: 1px solid rgba(0, 240, 255, 0.4);
    border-radius: 8px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--cyan-electric);
    box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.15);
}

.route-badge-letter {
    position: absolute;
    bottom: -3px;
    right: -3px;
    background: #0088cc;
    color: #ffffff;
    font-family: var(--font-racing);
    font-size: 11px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid var(--bg-carbon);
}

.route-info {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.route-info h3 {
    margin: 0 0 4px 0;
    color: #ffffff;
    font-family: var(--font-racing);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.route-record-preview {
    font-size: 13px;
    color: var(--text-muted);
    margin: 2px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-time-display {
    font-family: var(--font-mono);
    color: var(--nfs-orange);
    font-weight: 800;
    text-shadow: var(--nfs-subtle-glow);
}

.route-record-preview .driver-name {
    font-weight: 600;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}

.route-action-icon {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.route-card:hover .route-action-icon {
    color: #ffffff;
    border-color: var(--nfs-orange);
}

/* ==========================================================================
   TABLAS TELEMETRÍA (FÓRMULA 1 + eSPORTS)
   ========================================================================== */
.tabs-group {
    display: none;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tabs-group.active-group {
    display: flex;
}

.tab-btn {
    background: var(--bg-surface);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-racing);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.25s;
}

.tab-btn:hover {
    color: #ffffff;
    background: var(--bg-surface-elevated);
}

.tab-btn.active {
    background: var(--nfs-orange);
    color: #07080a;
    border-color: var(--nfs-orange);
    font-weight: 800;
    box-shadow: var(--nfs-orange-glow);
}

.table-section {
    display: none;
}

.table-section.active {
    display: block;
}

.table-container {
    background: var(--bg-surface);
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    overflow-x: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 25px;
    padding: 6px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
    text-align: left;
    min-width: 780px;
}

th {
    background-color: transparent;
    color: var(--text-muted);
    font-family: var(--font-racing);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

tbody tr {
    background: rgba(255, 255, 255, 0.015);
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: rgba(255, 119, 0, 0.08);
    box-shadow: inset 3px 0 0 var(--nfs-orange);
}

td {
    padding: 14px 16px;
    font-size: 14px;
    border-top: 1px solid transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* Ranks con Resplandor Iluminado */
.rank-1 { 
    color: #ffd700; 
    font-family: var(--font-racing);
    font-size: 18px;
    font-weight: 900; 
    text-shadow: var(--gold-glow); 
}
.rank-2 { 
    color: #e2e8f0; 
    font-family: var(--font-racing);
    font-size: 17px;
    font-weight: 800; 
    text-shadow: var(--silver-glow);
}
.rank-3 { 
    color: #ff9f43; 
    font-family: var(--font-racing);
    font-size: 17px;
    font-weight: 800; 
    text-shadow: var(--bronze-glow);
}

/* Pills de Telemetría (Auto, Control, Caja) */
.telemetry-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.btn-youtube {
    background: linear-gradient(135deg, #cc0000 0%, #ff1a1a 100%);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--font-racing);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 10px rgba(204, 0, 0, 0.4);
    transition: all 0.2s;
}

.btn-youtube:hover {
    background: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
    transform: translateY(-1px);
}

/* ==========================================================================
   NOTICIAS & TARJETAS INFORMATIVAS
   ========================================================================== */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
}

@media (min-width: 768px) {
    .news-grid { grid-template-columns: 1fr 1fr; }
}

.news-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--nfs-orange);
    box-shadow: var(--nfs-subtle-glow);
}

.news-card h3 {
    margin-top: 0;
    font-family: var(--font-racing);
    font-size: 20px;
    font-weight: 800;
    color: var(--nfs-orange);
    letter-spacing: 1px;
}

/* ==========================================================================
   FORMULARIO ENVIAR TIEMPO & EXPEDIENTE
   ========================================================================== */
.form-card {
    max-width: 680px;
    margin: 0 auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-top: 3px solid var(--nfs-orange);
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.form-row {
    display: flex;
    gap: 14px;
}

.form-row > div {
    flex: 1;
}

.form-label {
    color: var(--text-main);
    font-family: var(--font-racing);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: #08090d;
    color: #ffffff;
    font-family: var(--font-ui);
    font-size: 14px;
    outline: none;
    transition: all 0.25s;
}

.form-control:focus {
    border-color: var(--nfs-orange);
    box-shadow: 0 0 12px rgba(255, 119, 0, 0.4);
    background: #0c0e14;
}

.btn-submit {
    background: linear-gradient(135deg, var(--nfs-orange) 0%, #d45500 100%);
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-family: var(--font-racing);
    font-weight: 800;
    cursor: pointer;
    margin-top: 12px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.25s;
    width: 100%;
    box-shadow: 0 4px 18px rgba(255, 119, 0, 0.4);
}

.btn-submit:hover {
    background: #ff8c1a;
    box-shadow: var(--nfs-orange-glow);
    transform: translateY(-1px);
}

.btn-load-more {
    background: var(--bg-surface);
    color: var(--nfs-orange);
    border: 1px solid var(--nfs-orange);
    padding: 10px 24px;
    font-family: var(--font-racing);
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s;
}

.btn-load-more:hover {
    background: var(--nfs-orange);
    color: #07080a;
    box-shadow: var(--nfs-orange-glow);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    margin-top: auto;
    background-color: #060709;
    border-top: 1px solid var(--border-subtle);
    padding: 40px 20px;
    text-align: center;
    color: var(--text-dimmed);
    font-size: 13px;
    line-height: 1.7;
}

footer strong {
    color: var(--text-muted);
}
