/* =================================================================== */
/* 0. FIX CRÍTICO DE SCROLL                                            */
/* =================================================================== */
html,
body {
    height: auto !important;
    /* Permite que la página crezca */
    min-height: 100vh !important;
    /* Al menos el alto de la pantalla */
    overflow-y: auto !important;
    /* Activa la barra de scroll vertical */
    overflow-x: hidden !important;
    /* Evita scroll horizontal */
    justify-content: flex-start !important;
    /* Empieza arriba, no centrado verticalmente */
    padding-bottom: 2rem !important;
    /* Espacio al final */
}

/* Ajuste para que el fondo no se corte al hacer scroll */
#bg {
    position: fixed;
    height: 100vh;
}

/* Hereda estructura básica de main_even.css */

/* Layout Principal */
#swim-main-content {
    width: 95%;
    max-width: 1200px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Controles (Estilo Glass similar a gpx.css) */
.swim-controls.glass-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.3);
    /* Borde Cyan */
    backdrop-filter: blur(5px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    flex-wrap: wrap;
}

#fitFileInput {
    display: none;
}

.file-upload-btn,
.strava-btn {
    display: inline-flex !important;
    /* Forzar flex */
    align-items: center;
    justify-content: center;
    height: 46px;
    /* Altura fija idéntica */
    line-height: 1;
    /* Resetear altura de línea */
    padding: 0 24px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    cursor: pointer;
    box-sizing: border-box;
    /* Clave para que el padding no afecte altura */
    margin: 0;
    /* Quitar márgenes nativos */
    text-decoration: none;
}

/* Botón Cargar FIT (Cyan Brillante) */
.file-upload-btn {
    background-color: rgba(0, 242, 255, 0.15);
    border: 1px solid #00f2ff;
    color: #00f2ff;
    transition: all 0.3s ease;
}

.file-upload-btn:hover {
    background-color: #00f2ff;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
    transform: translateY(-2px);
}

/* Botón Strava (Naranja) */
.strava-btn {
    background: rgba(252, 76, 2, 0.2);
    border: 1px solid #fc4c02;
    color: #fc4c02;
    gap: 8px;
    transition: all 0.3s ease;
}

.strava-btn:hover {
    background: #fc4c02;
    color: #fff;
    transform: translateY(-2px);
}


.upload-status-wrapper {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    font-size: 0.9rem;
    margin-left: 10px;
}

/* Grid de Telemetría */
.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    width: 100%;
}

.telemetry-card {
    background: rgba(10, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

/* Bordes superiores de colores para KPIs */
.type-dist {
    border-top: 3px solid #00f2ff;
}

/* Distancia */
.type-time {
    border-top: 3px solid #f5c842;
}

/* Tiempo */
.type-swolf {
    border-top: 3px solid #ff3e4d;
}

/* Swolf */
.type-pace {
    border-top: 3px solid #1cb495;
}

/* Ritmo */

.telemetry-card h4 {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    margin: 0 0 0.5rem 0;
}

.telemetry-card .value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
}

.telemetry-card .unit {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 2px;
}

/* Icono de fondo sutil */
.telemetry-card i.bg-icon {
    position: absolute;
    bottom: -10px;
    right: -10px;
    font-size: 4rem;
    opacity: 0.05;
    pointer-events: none;
}

/* Título de Sesión */
.session-title {
    font-size: 1.8rem;
    color: #00f2ff;
    text-transform: uppercase;
    font-weight: 900;
    text-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}

.session-date {
    color: #aaa;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
}

/* Tablas */
.table-wrapper {
    overflow: hidden;
    padding: 1.5rem;
    background: rgba(10, 10, 10, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.table-wrapper h3 {
    color: #00f2ff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.table-scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table th {
    text-align: left;
    color: #f5c842;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
}

table td {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ddd;
}

table tr:hover td {
    background: rgba(0, 242, 255, 0.05);
    color: #fff;
}

/* Animaciones */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}