* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

:root {
    --bg-sand: #E6DFD3;
    --dark-green: #0A4D3C;
    --dark-green-hover: #07382b;
    --terracotta: #C87941;
    --terracotta-hover: #b06938;
    --white: #FFFFFF;
    --text-dark: #2C3E50;
    --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.08);
}

body {
    background-image: url('img/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: var(--bg-sand);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-top: 80px; 
}

/* --- Cabecera / Top Bar --- */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    z-index: 900;
}

.btn-menu-icon {
    background: none;
    border: none;
    color: var(--dark-green);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.btn-menu-icon:active {
    transform: scale(0.9);
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.header-logo img {
    height: 40px; 
    width: auto;
    object-fit: contain;
}

/* --- Selector de idiomas integrado --- */
.lang-selector {
    position: relative;
    display: inline-block;
}

.lang-current {
    background: transparent;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--dark-green);
    transition: background 0.2s;
}

.lang-current:hover {
    background: rgba(0, 0, 0, 0.04);
}

.lang-current img {
    width: 24px;
    height: auto;
    border-radius: 4px;
}

.chevron-icon {
    transition: transform 0.3s ease;
}

.lang-selector.active .chevron-icon {
    transform: rotate(180deg);
}

.lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 120%;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    z-index: 1000;
    min-width: 60px;
    overflow: hidden;
    padding: 8px 0;
}

.lang-dropdown a {
    display: flex;
    justify-content: center;
    padding: 10px;
    text-decoration: none;
    transition: background 0.2s;
}

.lang-dropdown a img {
    width: 24px;
    height: auto;
    border-radius: 4px;
}

.lang-dropdown a:hover {
    background-color: #f5f5f7;
}

.lang-selector.active .lang-dropdown {
    display: block;
    animation: fadeInDown 0.2s ease;
}

/* --- Menú Lateral (Off-canvas) --- */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--white);
    box-shadow: 4px 0 24px rgba(0,0,0,0.1);
    z-index: 999;
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.side-menu.active {
    left: 0;
}

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.side-menu-logo {
    height: 35px;
    width: auto;
}

.btn-close-menu {
    background: #f0f0f0;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 14px;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-close-menu:hover {
    background: #e0e0e0;
}

.side-menu-links {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.side-menu-links a {
    padding: 16px 24px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.side-menu-links a:hover {
    background: #f8f9fa;
    color: var(--dark-green);
    border-left-color: var(--dark-green);
}

/* Footer del menú lateral con Powered by */
.side-menu-footer {
    margin-top: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-top: 1px solid #f0f0f0;
}

.side-menu-powered {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.side-menu-kronia-logo {
    width: 100px;
    height: auto;
    opacity: 0.9;
}

/* --- Envoltorio Central --- */
.center-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Alinea contenido en el centro vertical */
    flex-grow: 1; /* Permite ocupar el espacio restante */
    padding: 0 16px 40px 16px;
    gap: 25px; 
}

/* --- Tarjeta de Contenido Principal --- */
.main-card {
    background-color: var(--white);
    width: 100%;
    max-width: 450px;
    border-radius: 28px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.content-title {
    color: var(--dark-green);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* --- Contenedor del Vídeo --- */
.video-container {
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background-color: #111;
    aspect-ratio: 16 / 9;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Controles Estilizados --- */
.player-controls {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.progress-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    background: #f8f9fa;
    padding: 10px 16px;
    border-radius: 12px;
}

.time-display {
    font-size: 0.8rem;
    color: #888;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Slider moderno */
#progress-bar {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e0e0e0;
    border-radius: 10px;
    outline: none;
    cursor: pointer;
}

#progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--terracotta);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(200, 121, 65, 0.5);
}

.control-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.btn-control {
    background-color: transparent;
    color: var(--dark-green);
    border: none;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.btn-control:hover {
    background: #eef0f2;
    transform: translateY(-2px);
}

.btn-control:active {
    transform: scale(0.95);
}

.btn-play-pause {
    background-color: var(--terracotta);
    color: var(--white);
    width: 64px;
    height: 64px;
    box-shadow: 0 6px 16px rgba(200, 121, 65, 0.3);
}

.btn-play-pause:hover {
    background-color: var(--terracotta-hover);
    box-shadow: 0 8px 20px rgba(200, 121, 65, 0.4);
}

/* --- Botón Chat IA Píldora --- */
.btn-chat-ia-aesthetic {
    background: linear-gradient(135deg, var(--dark-green), #116b54);
    color: var(--white);
    border: none;
    padding: 10px 24px 10px 10px;
    border-radius: 50px; 
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(10, 77, 60, 0.25);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-top: 10px;
}

.btn-chat-ia-aesthetic:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(10, 77, 60, 0.35);
}

.btn-chat-ia-aesthetic:active {
    transform: scale(0.96) translateY(0);
}

.chat-icon-wrapper {
    background: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chat-icon-wrapper img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* --- Sección Colaboradores --- */
.sponsors-section {
    width: 100%;
    background-color: var(--white); 
    border-top: 1px solid #f0f0f0;
    padding: 10px 0; /* Padding ajustado a 10px */
}

.sponsor-banner {
    width: 100%;
    display: flex;
    justify-content: center;
}

.sponsor-banner img {
    width: 100%;
    max-width: 95%; /* 95% del ancho de la pantalla */
    height: auto; 
    border-radius: 12px;
    transition: opacity 0.5s ease-in-out; 
}

/* --- Utilidades y Animaciones --- */
.hidden { display: none !important; }

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   LOADER PREMIUM - KRÒNIA
   ========================================== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-sand);
    z-index: 9999; 
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 320px;
    padding: 20px;
    height: 85vh; 
    justify-content: space-between;
}

.loader-logo-main {
    width: 140px;
    height: auto;
    margin-top: 40px;
    animation: pulse 2s infinite ease-in-out;
}

.loader-title {
    font-size: 1.8rem;
    color: var(--dark-green);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-top: -20px;
}

.spinner {
    width: 46px;
    height: 46px;
    border: 4px solid rgba(10, 77, 60, 0.1);
    border-left-color: var(--terracotta); 
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    margin: 20px 0;
}

.loader-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.loader-powered {
    font-size: 0.75rem;
    color: #777777;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.loader-logo-kronia {
    width: 90px;
    height: auto;
    opacity: 0.9;
}

.page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}