:root {
    --vh: 100%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a3a 0%, #0d1b2a 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

body.fullscreen-mode {
    overflow: hidden;
}

header {
    background: rgba(10, 25, 47, 0.9);
    padding: 1rem 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

body.fullscreen-mode header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1001;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 2.5rem;
    color: #c9a227;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, #c9a227, #e6c84e);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: rgba(201, 162, 39, 0.2);
    color: #e6c84e;
}

.exit-fullscreen-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: rgba(201, 162, 39, 0.2);
    color: #e6c84e;
    border: 1px solid #c9a227;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.exit-fullscreen-btn:hover {
    background: rgba(201, 162, 39, 0.3);
}

body.fullscreen-mode .exit-fullscreen-btn {
    display: flex;
}

body.fullscreen-mode .nav-links {
    display: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    transition: all 0.3s ease;
}

body.fullscreen-mode .container {
    padding: 0;
    max-width: 100%;
    margin-top: 80px;
    /* Compensa la altura del header fijo */
}

.hero {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

body.fullscreen-mode .hero {
    display: none;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #c9a227, #e6c84e);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    color: #b0b0b0;
    line-height: 1.6;
}

.fullscreen-hint {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(201, 162, 39, 0.1);
    color: #e6c84e;
    border: 1px solid #c9a227;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.fullscreen-hint:hover {
    background: rgba(201, 162, 39, 0.2);
    transform: translateY(-2px);
}

body.fullscreen-mode .fullscreen-hint {
    display: none;
}

.iframe-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    height: 75vh;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    background: #000;
    /* Fondo negro para evitar parpadeo blanco */
    cursor: pointer;
    /* Cursor pointer para indicar que es clickeable */
}

body.fullscreen-mode .iframe-container {
    position: fixed;
    top: 80px;
    /* Debajo del header fijo */
    left: 0;
    width: 100vw;
    height: calc(var(--vh, 1vh) * 100 - 80px);
    /* Altura total menos el header */
    border-radius: 0;
    z-index: 1000;
    box-shadow: none;
    border: none;
    cursor: default;
    /* En pantalla completa, cursor normal */
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
    /* Fondo negro para evitar parpadeo blanco */
    pointer-events: none;
    /* IMPORTANTE: Desactiva eventos táctiles en el iframe */
}

body.fullscreen-mode iframe {
    pointer-events: auto;
    /* En pantalla completa, permite interacción */
}

/* Overlay para capturar toques en móviles */
.iframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 5;
    cursor: pointer;
    display: block;
}

body.fullscreen-mode .iframe-overlay {
    display: none;
    /* En pantalla completa, oculta el overlay */
}

.loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(10, 25, 47, 0.9);
    z-index: 10;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(201, 162, 39, 0.3);
    border-radius: 50%;
    border-top-color: #c9a227;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading p {
    font-size: 1.2rem;
    color: #e6c84e;
}

footer {
    background: rgba(10, 25, 47, 0.9);
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
    color: #b0b0b0;
    transition: all 0.3s ease;
}

body.fullscreen-mode footer {
    display: none;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #e6c84e;
}

.disclaimer {
    font-size: 0.9rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Media Queries para dispositivos móviles */
@media (max-width: 768px) {
    header {
        padding: 0.8rem 1rem;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .logo {
        gap: 10px;
    }

    .logo-icon {
        font-size: 2rem;
    }

    .logo h1 {
        font-size: 1.4rem;
    }

    .nav-links {
        display: none;
    }

    .exit-fullscreen-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .container {
        padding: 1rem;
    }

    .fullscreen-hint {
        font-size: 0.9rem;
        padding: 10px 15px;
    }

    body.fullscreen-mode .container {
        margin-top: 70px;
        /* Ajustado para header más compacto en móvil */
    }

    body.fullscreen-mode .iframe-container {
        top: 70px;
        height: calc(var(--vh, 1vh) * 100 - 70px);
    }

    /* Estilos específicos para móviles en modo pantalla completa */
    body.fullscreen-mode header {
        padding: 0.5rem 1rem;
    }

    body.fullscreen-mode .logo h1 {
        font-size: 1.3rem;
    }

    body.fullscreen-mode .exit-fullscreen-btn {
        padding: 5px 10px;
        font-size: 0.85rem;
    }

    /* Efecto sutil al tocar el iframe en móviles */
    .iframe-container:active:not(.fullscreen-mode) {
        transform: scale(0.99);
        transition: transform 0.1s ease;
    }
}

/* Media Queries para pantallas muy pequeñas */
@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.2rem;
    }

    .exit-fullscreen-btn {
        padding: 5px 8px;
        font-size: 0.8rem;
    }

    .exit-fullscreen-btn svg {
        width: 18px;
        height: 18px;
    }

    body.fullscreen-mode .container {
        margin-top: 60px;
    }

    body.fullscreen-mode .iframe-container {
        top: 60px;
        height: calc(var(--vh, 1vh) * 100 - 60px);
    }
}