/* Estilos principales para la Landing Page y Vista de Transmisión */

:root{
    --brand-burgundy:#8b0e2b;
    --brand-red:#e01e37;
    --brand-dark:#0f0f14;
    --brand-dark-2:#17171d;
    --text:#ffffff;
}

/* Scroll personalizado */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--brand-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--brand-red);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c41e3a;
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Asegurar que el body sea scrolleable */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}
.landing-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding: 28px 20px;
    background: var(--brand-burgundy);
    color: var(--text);
    text-align: center;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    overflow-x: hidden;
}
.hero { width: 100%; max-width: 980px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero-card{
    position: relative;
    width: 100%;
    border-radius: 20px;
    padding: 28px 28px 36px 28px;
    background: linear-gradient(180deg, var(--brand-dark) 0%, var(--brand-dark-2) 100%);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 18px 50px rgba(0,0,0,.35);
    overflow: hidden;
}
.hero-badge{ font-size: .85rem; letter-spacing: .08em; opacity: .9; margin-bottom: 6px; text-transform: uppercase; }
.hero-badge .accent{ color: var(--brand-red); font-weight: 700; }
.hero-title{ font-family: 'Montserrat', sans-serif; margin: 0; line-height: 1.06; text-align: left; }
.hero-title span{ display:block; font-weight: 800; }
.hero-title .year{ font-size: clamp(2.8rem, 8vw, 5.2rem); letter-spacing: .02em; }
.hero-title span:nth-child(1){ font-size: clamp(1.2rem, 3.6vw, 1.8rem); opacity:.95; }
.hero-title span:nth-child(2){ font-size: clamp(1.6rem, 4.6vw, 2.4rem); opacity:1; }
.hero-stripes{
    position: absolute; right: 28px; top: 18px; bottom: 18px; width: 14px; display: flex; gap: 8px; align-items: stretch;
}
.hero-stripes::before, .hero-stripes::after{
    content:""; display:block; width: 6px; background: var(--brand-red); border-radius: 6px;
}
.hero-rook{ position: absolute; right: 60px; bottom: 18px; font-size: 62px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.5)); opacity:.9; }
.tagline{ margin: 0; font-weight: 800; letter-spacing:.04em; text-transform: uppercase; }
.subtagline{ margin: 0; opacity:.85; font-size:.95rem; letter-spacing:.06em; text-transform: uppercase; }

/* Estilos para la sección de instrucciones */
.instructions-section {
    width: 100%;
    max-width: 800px;
    margin: 32px 0 24px 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.instructions-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    margin: 0 0 20px 0;
    text-align: center;
    color: var(--text);
}
.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.instruction-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.step-number {
    width: 32px;
    height: 32px;
    background: var(--brand-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.step-content h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 4px 0;
    color: var(--text);
}
.step-content p {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.9;
    line-height: 1.4;
}

.landing-grid {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 8px;
}
.landing-card {
    display: block;
    padding: 20px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    background: #14141a;
    border: 1.5px solid rgba(224, 30, 55, .35);
    outline: 2px solid rgba(255,255,255,0.04);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
    cursor: pointer;
}
.landing-card:hover{ 
    transform: translateY(-5px); 
    border-color: var(--brand-red); 
    background:#171720; 
    box-shadow: 0 12px 28px rgba(0,0,0,.35); 
}
.landing-card:hover .landing-icon {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(224, 30, 55, .5);
}
.landing-icon { 
    width: 100%; 
    height: 180px; 
    margin-bottom: 16px; 
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 6px 20px rgba(0,0,0,.4);
    transition: transform .2s ease, box-shadow .2s ease;
}
.landing-card-title { 
    font-family:'Montserrat', sans-serif; 
    font-weight: 800; 
    margin-bottom: 8px; 
    font-size: 1.1rem;
    line-height: 1.3;
}
.landing-card-desc { 
    opacity: .92; 
    font-size: .9rem; 
    font-weight: 600;
    color: var(--brand-red);
    margin-bottom: 8px;
}
.landing-card-action {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Estilos para cards deshabilitadas */
.landing-card.disabled {
    opacity: 0.5;
    background: #0a0a0f;
    border-color: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    filter: grayscale(1);
    pointer-events: none;
}

.landing-card.disabled:hover {
    transform: none;
    box-shadow: none;
}

.landing-card.disabled .landing-icon {
    opacity: 0.6;
}

.landing-card.disabled .landing-card-action {
    opacity: 0.5;
}

.disabled-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

/* Botón de charla obligatoria */
.charla-button {
    display: block;
    width: 100%;
    max-width: 700px;
    padding: 24px 28px;
    margin: 24px 0;
    background: linear-gradient(135deg, #1a5f7a 0%, #159895 100%);
    color: var(--text);
    text-decoration: none;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(21, 152, 149, 0.4);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    text-align: left;
}

.charla-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.charla-button:hover::before {
    left: 100%;
}

.charla-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(21, 152, 149, 0.6);
    border-color: rgba(255, 255, 255, 0.4);
}

.charla-button:active {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(21, 152, 149, 0.5);
}

.charla-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.charla-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.charla-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    margin: 0;
    line-height: 1.3;
}

.charla-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.charla-info-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.charla-info-item .emoji {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.charla-info-text {
    font-size: 0.9rem;
    line-height: 1.4;
}

.charla-info-label {
    font-weight: 700;
    display: inline;
}

.charla-badge {
    display: inline-block;
    background: rgba(255, 193, 7, 0.9);
    color: #000;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.charla-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.95);
}

.charla-action svg {
    transition: transform 0.3s ease;
}

.charla-button:hover .charla-action svg {
    transform: translateX(4px);
}

/* Botón de grabaciones */
.recordings-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    margin-top: 24px;
    background: linear-gradient(135deg, var(--brand-red) 0%, #c41e3a 100%);
    color: var(--text);
    text-decoration: none;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 8px 24px rgba(224, 30, 55, 0.4);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.recordings-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.recordings-button:hover::before {
    left: 100%;
}

.recordings-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(224, 30, 55, 0.6);
    border-color: rgba(255, 255, 255, 0.4);
}

.recordings-button:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(224, 30, 55, 0.5);
}

.recordings-button svg {
    flex-shrink: 0;
}

.recordings-button .arrow-icon {
    transition: transform 0.3s ease;
}

.recordings-button:hover .arrow-icon {
    transform: translateX(4px);
}

/* Estilos para la vista de transmisión (cuando se hace clic en una card) */
#app-view {
    display: none;
    width: 100%;
    height: 100vh;
    background: var(--brand-dark);
}

/* Contenedor principal del chat */
#app-view .container {
    display: grid;
    grid-template-columns: 1fr 400px;
    grid-template-rows: 1fr;
    gap: 16px;
    height: 100vh;
    padding: 16px;
    box-sizing: border-box;
    background: var(--brand-dark);
}

/* Video container */
#app-view .video-container {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Overlay invisible para bloquear interacciones del YouTube */
.youtube-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: transparent;
    pointer-events: auto;
    cursor: default;
}

/* Controles del video */
.video-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 30;
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.control-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn svg {
    width: 24px;
    height: 24px;
}

/* Estilos específicos para el botón de sonido */
.sound-btn.sound-on {
    background: rgba(76, 175, 80, 0.8);
    border-color: rgba(76, 175, 80, 0.6);
}

.sound-btn.sound-on:hover {
    background: rgba(76, 175, 80, 0.9);
    border-color: rgba(76, 175, 80, 0.8);
}

.sound-btn:not(.sound-on) {
    background: rgba(244, 67, 54, 0.7);
    border-color: rgba(244, 67, 54, 0.5);
}

.sound-btn:not(.sound-on):hover {
    background: rgba(244, 67, 54, 0.9);
    border-color: rgba(244, 67, 54, 0.7);
}

#app-view .video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Chat container */
#app-view .chat-container {
    background: var(--brand-dark-2);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
}

#app-view .chat-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Botón de volver */
.back-button {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 100;
    background: var(--brand-red);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all .2s ease;
    box-shadow: 0 6px 16px rgba(0,0,0,.2);
}

.back-button:hover {
    background: #c41e3a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.3);
}

/* Estilos para pantalla completa personalizada */
.custom-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.fullscreen-video-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.fullscreen-video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.fullscreen-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.fullscreen-controls .control-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.fullscreen-controls .control-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.1);
}

.fullscreen-controls .control-btn:active {
    transform: scale(0.95);
}

.fullscreen-controls .control-btn svg {
    width: 24px;
    height: 24px;
}

/* Estilos específicos para el botón de sonido en pantalla completa */
.fullscreen-sound-btn.sound-on {
    background: rgba(76, 175, 80, 0.8);
    border-color: rgba(76, 175, 80, 0.6);
}

.fullscreen-sound-btn.sound-on:hover {
    background: rgba(76, 175, 80, 0.9);
    border-color: rgba(76, 175, 80, 0.8);
}

.fullscreen-sound-btn:not(.sound-on) {
    background: rgba(244, 67, 54, 0.7);
    border-color: rgba(244, 67, 54, 0.5);
}

.fullscreen-sound-btn:not(.sound-on):hover {
    background: rgba(244, 67, 54, 0.9);
    border-color: rgba(244, 67, 54, 0.7);
}

@media (max-width: 768px) { 
    .landing-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 16px;
    }
    .landing-icon {
        height: 150px;
    }
    .instructions-section {
        margin: 24px 0 20px 0;
        padding: 20px;
    }
    .instructions-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Responsive para la vista de transmisión */
    #app-view .container {
        grid-template-columns: 1fr;
        grid-template-rows: 60vh 1fr;
        padding: 8px;
        gap: 8px;
    }
    
    .video-controls {
        bottom: 15px;
        right: 15px;
        gap: 8px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
    }
    
    .control-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Tablet landscape */
@media (max-width: 1024px) and (orientation: landscape) {
    .landing-wrapper {
        padding: 20px;
    }
    .hero-card {
        padding: 24px;
    }
}
@media (max-width: 520px) { 
    .hero-rook{ right: 24px; font-size: 48px; }
    .landing-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .landing-icon {
        height: 140px;
    }
    .landing-wrapper {
        padding: 20px 16px;
        gap: 16px;
    }
    .instructions-section {
        margin: 20px 0 16px 0;
        padding: 16px;
    }
    .instructions-title {
        font-size: 1.2rem;
    }
    .hero-card {
        padding: 20px;
    }
}

/* Breakpoint extra pequeño */
@media (max-width: 360px) {
    .landing-wrapper {
        padding: 16px 12px;
    }
    .hero-card {
        padding: 16px;
    }
    .landing-card {
        padding: 16px;
    }
    .instructions-section {
        padding: 12px;
    }
}

/* ===== LOADER DE TRANSICIÓN ===== */
.transition-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--brand-burgundy) 0%, var(--brand-dark) 100%);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.transition-loader.active {
    display: flex;
    opacity: 1;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    animation: fadeInUp 0.5s ease;
}

.loader-spinner {
    display: flex;
    gap: 12px;
    align-items: center;
}

.spinner-circle {
    width: 16px;
    height: 16px;
    background: var(--brand-red);
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(224, 30, 55, 0.6);
}

.spinner-circle:nth-child(1) {
    animation-delay: 0s;
}

.spinner-circle:nth-child(2) {
    animation-delay: 0.2s;
}

.spinner-circle:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.6;
    }
}

.loader-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.loader-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.loader-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.02em;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive para el loader */
@media (max-width: 768px) {
    .loader-title {
        font-size: 1.2rem;
    }
    .loader-subtitle {
        font-size: 0.85rem;
    }
    .spinner-circle {
        width: 14px;
        height: 14px;
    }
    
    .recordings-button {
        font-size: 0.95rem;
        padding: 14px 28px;
        gap: 10px;
    }
    
    .charla-button {
        padding: 20px 24px;
    }
    
    .charla-title {
        font-size: 1.1rem;
    }
    
    .charla-content {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .charla-info-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 520px) {
    .loader-title {
        font-size: 1.1rem;
    }
    .loader-subtitle {
        font-size: 0.8rem;
    }
    .spinner-circle {
        width: 12px;
        height: 12px;
    }
    .loader-content {
        gap: 20px;
    }
    
    .recordings-button {
        font-size: 0.85rem;
        padding: 12px 24px;
        gap: 8px;
    }
    
    .recordings-button svg {
        width: 20px;
        height: 20px;
    }
    
    .recordings-button .arrow-icon {
        width: 18px;
        height: 18px;
    }
    
    .charla-button {
        padding: 16px 20px;
    }
    
    .charla-icon {
        font-size: 1.6rem;
    }
    
    .charla-title {
        font-size: 1rem;
    }
    
    .charla-info-text {
        font-size: 0.8rem;
    }
    
    .charla-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    .charla-action {
        font-size: 0.85rem;
    }
}

