/* ============================================
   FUENTES LOCALES INTER (sin dependencia externa)
   ============================================ */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100;
    src: url('../fonts/Inter-Thin.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 200;
    src: url('../fonts/Inter-ExtraLight.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    src: url('../fonts/Inter-Light.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    src: url('../fonts/Inter-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/Inter-Bold.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    src: url('../fonts/Inter-ExtraBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 900;
    src: url('../fonts/Inter-Black.woff2') format('woff2');
}

/* Versión cursiva (opcional) */
@font-face {
    font-family: 'Inter';
    font-style: italic;
    font-weight: 400;
    src: url('../fonts/Inter-Italic.woff2') format('woff2');
}

/* ============================================
   APROBADOYA - ESTILOS COMPLETOS
   Plataforma de preparación para el examen de conducir
   ============================================ */

/* ===== RESET Y VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #1a472a;
    --primary-green-dark: #0f2a1a;
    --primary-green-light: #2d5a3a;
    --secondary-gold: #fbbf24;
    --secondary-gold-dark: #f59e0b;
    --secondary-gold-light: #fcd34d;
    --gray-dark: #1e293b;
    --gray-medium: #334155;
    --gray-light: #64748b;
    --gray-bg: #f8fafc;
    --white: #ffffff;
    --error-red: #dc2626;
    --success-green: #10b981;
    --warning-orange: #f97316;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    --radius-sm: 10px;
    --radius-md: 15px;
    --radius-lg: 20px;
    --radius-xl: 25px;
    --radius-full: 50px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--gray-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ===== TIPOGRAFÍA ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

a {
    text-decoration: none;
    color: inherit;
}

/* ===== HEADER Y NAVEGACIÓN CENTRADA ===== */
header {
    background: linear-gradient(135deg, #1a472a 0%, #0f2a1a 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Logo - izquierda */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo i {
    font-size: 2rem;
    color: #fbbf24;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.logo span {
    color: #fbbf24;
}

/* Contenedor del menú - centrado */
.nav-container {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.nav-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    max-width: 100%;
}

.nav-wrapper::-webkit-scrollbar {
    height: 4px;
}

.nav-wrapper::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.nav-wrapper::-webkit-scrollbar-thumb {
    background: #fbbf24;
    border-radius: 10px;
}

nav {
    display: flex;
    justify-content: center;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.8rem;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

nav ul li a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #fbbf24;
    transition: width 0.3s;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

nav ul li a:hover,
nav ul li a.active {
    color: #fbbf24;
}

/* Zona de usuario - derecha */
.user-zone {
    flex-shrink: 0;
}

.btn-login {
    background: #fbbf24;
    color: #1a472a;
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-login:hover {
    background: #f59e0b;
    transform: translateY(-2px);
    color: white;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-profile, .btn-logout {
    background: transparent;
    border: 1px solid #fbbf24;
    color: #fbbf24;
    padding: 6px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.btn-profile:hover, .btn-logout:hover {
    background: #fbbf24;
    color: #1a472a;
}

.menu-mobile {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #fbbf24;
    flex-shrink: 0;
}

/* Botones de navegación del carrusel */
.nav-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 100;
}

.nav-scroll-left {
    left: -5px;
}

.nav-scroll-right {
    right: -5px;
}

.nav-scroll-btn:hover {
    background: #fbbf24;
    color: #1a472a;
}

/* Responsive */
@media (max-width: 1024px) {
    header .container {
        flex-wrap: wrap;
    }
    
    .nav-container {
        order: 3;
        width: 100%;
        margin-top: 12px;
        justify-content: center;
    }
    
    .user-zone {
        order: 2;
    }
    
    .menu-mobile {
        order: 2;
        display: block;
    }
    
    .nav-scroll-btn {
        display: flex;
    }
}

@media (min-width: 1025px) {
    .nav-scroll-btn {
        display: none;
    }
    
    .nav-container {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-wrapper {
        width: 100%;
    }
    
    nav ul {
        gap: 1rem;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.logo span {
    color: var(--secondary-gold);
}

/* ===== CARRUSEL DE MENÚ ===== */
.nav-container {
    flex: 1;
    position: relative;
    margin: 0 10px;
}

.nav-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    position: relative;
}

.nav-wrapper::-webkit-scrollbar {
    height: 4px;
}

.nav-wrapper::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.nav-wrapper::-webkit-scrollbar-thumb {
    background: var(--secondary-gold);
    border-radius: 10px;
}

nav {
    display: inline-flex;
    white-space: nowrap;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

nav ul li a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-gold);
    transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--secondary-gold);
}

/* Botones de navegación del carrusel */
.nav-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-scroll-btn:hover {
    background: var(--secondary-gold);
    color: var(--primary-green);
    transform: translateY(-50%) scale(1.05);
}

.nav-scroll-left {
    left: -5px;
}

.nav-scroll-right {
    right: -5px;
}

/* Zona de usuario */
.user-zone {
    flex-shrink: 0;
}

.btn-login {
    background: var(--secondary-gold);
    color: var(--primary-green);
    padding: 10px 24px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-login:hover {
    background: var(--secondary-gold-dark);
    transform: translateY(-2px);
    color: white;
}

.menu-mobile {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-gold);
    flex-shrink: 0;
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "🚗";
    position: absolute;
    font-size: 200px;
    opacity: 0.05;
    bottom: -50px;
    right: -50px;
    transform: rotate(-15deg);
}

.hero::after {
    content: "🛑";
    position: absolute;
    font-size: 150px;
    opacity: 0.05;
    top: -30px;
    left: -30px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* ===== BOTONES ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-gold), var(--secondary-gold-dark));
    color: var(--primary-green);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(251,191,36,0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--secondary-gold);
    color: var(--secondary-gold);
}

.btn-secondary:hover {
    background: var(--secondary-gold);
    color: var(--primary-green);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary-gold);
    color: var(--secondary-gold);
    padding: 10px 25px;
}

.btn-outline:hover {
    background: var(--secondary-gold);
    color: var(--primary-green);
}

/* ===== SECCIONES GENERALES ===== */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-gold), var(--secondary-gold-dark));
    color: var(--primary-green);
    padding: 5px 15px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--gray-dark);
    margin-bottom: 15px;
}

.section-subtitle {
    color: var(--gray-light);
    font-size: 1.1rem;
}

/* ===== ESTADÍSTICAS ===== */
.stats {
    padding: 60px 0;
    background: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-card {
    padding: 30px;
    background: var(--gray-bg);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary-gold);
}

/* ===== SECCIÓN RÁPIDA ===== */
.quick-sections {
    padding: 60px 0;
    background: #f1f5f9;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.quick-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    text-decoration: none;
    color: var(--gray-dark);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
}

.quick-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-gold);
}

.quick-card i {
    font-size: 2.5rem;
    color: var(--secondary-gold);
    margin-bottom: 15px;
}

/* ===== TARJETAS DE TEST ===== */
.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.test-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 35px 30px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    border: 1px solid #e2e8f0;
}

.test-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--secondary-gold);
}

.test-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--secondary-gold), var(--secondary-gold-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.test-card h3 {
    margin-bottom: 12px;
    color: var(--gray-dark);
}

.test-card p {
    color: var(--gray-light);
    margin-bottom: 20px;
}

.test-badge {
    display: inline-block;
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--secondary-gold);
    font-weight: 500;
}

/* ===== TEMAS ===== */
.temas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.tema-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.tema-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tema-number {
    background: linear-gradient(135deg, var(--secondary-gold), var(--secondary-gold-dark));
    color: var(--primary-green);
    font-size: 1.8rem;
    font-weight: 700;
    width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tema-info {
    flex: 1;
    padding: 20px;
}

.tema-info h3 {
    margin-bottom: 8px;
    color: var(--gray-dark);
}

.tema-info p {
    color: var(--gray-light);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.tema-stats {
    display: flex;
    gap: 15px;
    font-size: 0.75rem;
    color: #94a3b8;
}

.progress-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-gold), var(--secondary-gold-dark));
    border-radius: 2px;
    width: 0%;
}

/* ===== SERVICIOS ===== */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.servicio-card {
    text-align: center;
    padding: 40px 25px;
    background: white;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
}

.servicio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.servicio-icon {
    background: rgba(251,191,36,0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.servicio-icon i {
    font-size: 2rem;
    color: var(--secondary-gold);
}

.servicio-card h3 {
    margin-bottom: 12px;
    color: var(--gray-dark);
}

/* ===== SOBRE NOSOTROS ===== */
.sobre {
    background: #fef7f0;
    position: relative;
    overflow: hidden;
}

.sobre-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.sobre-datos {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

.sobre-datos .numero {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-gold);
}

.sobre-imagen img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ===== CONTACTO ===== */
.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.horario-box {
    background: #fef7f0;
    padding: 25px;
    border-radius: var(--radius-lg);
    margin: 20px 0;
    border-left: 4px solid var(--secondary-gold);
}

.contacto-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.contacto-icon {
    width: 50px;
    height: 50px;
    background: rgba(251,191,36,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contacto-icon i {
    font-size: 1.2rem;
    color: var(--secondary-gold);
}

.contacto-formulario {
    background: white;
    padding: 35px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-gold);
    box-shadow: 0 0 0 3px rgba(251,191,36,0.1);
}

/* ===== FOOTER ===== */
footer {
    background: var(--gray-dark);
    color: #94a3b8;
    padding: 60px 0 30px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--secondary-gold);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--secondary-gold);
    color: var(--primary-green);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ===== RANKING ===== */
.ranking-table {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 60px;
}

.ranking-header {
    display: grid;
    grid-template-columns: 80px 1fr 120px 120px 120px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    color: white;
    padding: 18px 20px;
    font-weight: 600;
}

.ranking-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px 120px 120px;
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    align-items: center;
    transition: var(--transition);
}

.ranking-row:hover {
    background: #fef2f2;
}

.ranking-row.current-user {
    background: linear-gradient(90deg, #fff5f5, #ffffff);
    border-left: 4px solid var(--secondary-gold);
}

.posicion.oro { color: #fbbf24; }
.posicion.plata { color: #94a3b8; }
.posicion.bronce { color: #cd7f32; }

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary-gold), var(--secondary-gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green);
    font-weight: bold;
}

.puntuacion {
    font-weight: 700;
    color: var(--secondary-gold);
}

/* ===== MINI RETOS ===== */
.race-track {
    background: #2d3e2c;
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.track {
    position: relative;
    height: 120px;
    background: #4a5b3e;
    border-radius: 60px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
}

.car {
    position: absolute;
    bottom: 10px;
    left: 0%;
    font-size: 3rem;
    transition: left 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    z-index: 10;
}

.finish-line {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 30px;
    background: repeating-linear-gradient(90deg, #000 0px, #000 10px, #fff 10px, #fff 20px);
}

.score-board {
    display: flex;
    justify-content: space-between;
    background: rgba(0,0,0,0.5);
    border-radius: var(--radius-lg);
    padding: 15px 25px;
    margin-bottom: 30px;
    color: white;
}

.score-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary-gold);
}

/* ===== MODAL VIDEOS ===== */
.modal-video {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    max-width: 1000px;
    width: 90%;
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 18px 25px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-header button:hover {
    color: var(--secondary-gold);
    transform: rotate(90deg);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes celebration {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.car-shake {
    animation: shake 0.3s ease-in-out;
}

.celebration {
    animation: celebration 0.5s ease;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }
    
    .stats-grid {
        gap: 20px;
    }
    
    .stat-card {
        padding: 20px;
    }
}

@media (max-width: 1024px) {
    .nav-container {
        order: 3;
        width: 100%;
        margin-top: 12px;
        margin-bottom: 5px;
    }
    
    .user-zone {
        order: 2;
    }
    
    .menu-mobile {
        order: 2;
        display: block;
    }
    
    .nav-scroll-btn {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .sobre-grid,
    .contacto-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (min-width: 1025px) {
    .nav-scroll-btn {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    header .container {
        flex-wrap: wrap;
    }
    
    .nav-scroll-btn {
        width: 30px;
        height: 30px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .ranking-header,
    .ranking-row {
        grid-template-columns: 50px 1fr 80px 80px 80px;
        font-size: 0.7rem;
    }
    
    .temas-grid {
        grid-template-columns: 1fr;
    }
    
    .test-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
}

/* ===== UTILIDADES ===== */
.text-center {
    text-align: center;
}

.text-gold {
    color: var(--secondary-gold);
}

.bg-gold {
    background: var(--secondary-gold);
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.hidden {
    display: none;
}
/* ===== AVATAR DE USUARIO ===== */
.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(251,191,36,0.3);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.1);
    padding: 5px 15px 5px 5px;
    border-radius: 50px;
    transition: all 0.3s;
}

.user-menu:hover {
    background: rgba(255,255,255,0.2);
}

.user-name {
    font-weight: 500;
    color: white;
    font-size: 0.9rem;
}

.btn-profile, .btn-logout {
    background: transparent;
    border: none;
    color: #fbbf24;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.3s;
}

.btn-profile:hover, .btn-logout:hover {
    background: rgba(251,191,36,0.2);
    color: white;
}

/* Avatar en ranking */
.ranking-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

/* Avatar en perfil */
.profile-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.profile-avatar:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(251,191,36,0.3);
}