/* ESTILO UNIFICADO RADIOFIEL - 2026
   Sincronizado con app1.js y Markazi Text
*/

@font-face {
  font-family: 'Markazi Text';
  src: url('../fonts/markazi-text.woff2') format('woff2');
  font-display: swap;
}

* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
    margin: 0; 
    padding: 0; 
}

:root {
    --accent: 255,255,255;
    --accent-secondary: 100,100,100;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100dvh; /* clave */
    background-color: #000000;
    color: white;
    font-family: 'Markazi Text', serif !important;
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: pan-x pan-y;
    overscroll-behavior: none;
}

/* --- FONDO DINÁMICO --- */

body {
    transition: background 0.5s ease, filter 0.5s ease;
}

/* CONTENEDOR (lo podés dejar o eliminar) */
.bg-wrapper {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* capa fade */
.bg-fade {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* overlay dinámico */
.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    transition: background 0.4s ease;
}

/* texto automático */
body {
    color: var(--text-color);
}

/* ❌ sin imagen */
#bg-dynamic {
    display: none;
}

#bg-dynamic::before,
#bg-dynamic::after {
    display: none;
}

.bg-breathe {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: rgba(255,255,255,0.04);
    animation: breatheOpacity 10s ease-in-out infinite;
}

@keyframes breatheOpacity {
    0% { opacity: 0.04; }
    50% { opacity: 0.10; }
    100% { opacity: 0.04; }
}

body.is-playing .bg-breathe {
    display: block;
}

body.is-paused .bg-breathe {
    display: none;
}

/* =========================
   🎬 TRANSICIÓN SUAVE
   ========================= */
body {
    transition: background 0.6s ease, filter 0.6s ease;
}


/* =========================
   ▶️ PLAY (COLOR REAL)
   ========================= */
body.is-playing {
    filter: brightness(1) saturate(1);
    animation: breathe 10s ease-in-out infinite;
}


/* =========================
   ⏸ PAUSA (OSCURECE)
   ========================= */
body.is-paused {
    filter: brightness(0.35) saturate(0.8);
}

body.is-playing::before {
    content: "";
    position: fixed;
    inset: 0;

    background: radial-gradient(
        circle at center,
        rgba(var(--accent), 0.08),
        transparent 70%
    );

    pointer-events: none;
    z-index: 1;
}

/* --- ESTRUCTURA BASE: VISTA MÓVIL (VERTICAL) --- */

#app-shell {
    position: relative;
    z-index: 2 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    
    /* ESTA ES LA CLAVE: */
    /* Añadimos 20px de base + lo que mida el notch del iPhone */
    padding-top: calc(70px + env(safe-area-inset-top)); 
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
    padding-left: 20px;
    padding-right: 20px;
    height: 100dvh;
    width: 100vw;
    overflow: visible !important;
    box-sizing: border-box;
}

/* Portada Móvil: Ahora es elástica */
.album-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80vw; 
    height: 80vw;
    max-width: 350px; 
    max-height: 350px;
    aspect-ratio: 1 / 1;
    margin-top: 0px; /* Esto añade aire extra solo arriba de la foto */
    flex-shrink: 1; /* Permite que se encoja si el espacio falta */
    margin: 0;
}

.album-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,06);
    border: 2px solid rgba(255,255,255,0.1);
}

#albumArt {
    transition: opacity 0.3s ease;
}

/* --- ESTRUCTURA BASE: VISTA MÓVIL (VERTICAL) --- */

#app-shell {
    position: relative;
    z-index: 20 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    
    /* ESTA ES LA CLAVE: */
    /* Añadimos 20px de base + lo que mida el notch del iPhone */
    padding-top: calc(70px + env(safe-area-inset-top)); 
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
    padding-left: 20px;
    padding-right: 20px;
    height: 100dvh;
    width: 100vw;
    overflow: visible !important;
    box-sizing: border-box;
}

/* Portada Móvil: Ahora es elástica */
.album-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80vw; 
    height: 80vw;
    max-width: 350px; 
    max-height: 350px;
    aspect-ratio: 1 / 1;
    margin-top: 0px; /* Esto añade aire extra solo arriba de la foto */
    flex-shrink: 1; /* Permite que se encoja si el espacio falta */
    margin: 0;
}

.album-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,06);
    border: 2px solid rgba(255,255,255,0.1);
}

/* --- ALINEACIÓN VERTICAL (MÓVIL) --- */
.col-derecha-radio {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center !important; /* Fuerza el centro en móvil */
    text-align: center !important;
    position: relative;
    z-index: 25 !important;
    gap: 4px;
    overflow: visible !important;
}


.radio-brand-fixed {
    font-family: 'Markazi Text', serif !important;
    font-size: 3rem;
    font-weight: 600;
    width: 100%;
    text-align: center !important;
    margin-bottom: 1px;
}

/* 🔴 DOT */
.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff3b3b;
    display: inline-block;
}

/* ✨ ANIMACIÓN SOLO EN VIVO */
.live-indicator.live .live-dot {
    animation: livePulse 1.2s infinite;
}

/* ⚪ PAUSA */
.live-indicator.paused .live-dot {
    background: #999;
    animation: none;
}

.live-indicator {
    font-family: 'Markazi Text', serif;
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;
    margin: 10px 0;
}

/* 🔥 EFECTO LATIDO */
@keyframes livePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.7);
    }
    70% {
        transform: scale(1.3);
        box-shadow: 0 0 0 8px rgba(255, 59, 59, 0);
    }
    100% {
        transform: scale(1);
    }
}

.live-indicator.live .live-text {
    color: #ff3b3b;
}

/* Contenedor del scroll */
.scroll-wrapper {
    width: 95%; /* Limita el ancho para que el scroll tenga sentido */
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    justify-content: center; /* Centrado si el texto es corto */
}

/* La animación que dispara el JS */
#nowPlaying.is-scrolling, 
#artistInfo.is-scrolling,
#albumInfo.is-scrolling {
    display: inline-block;
    padding-left: 100%; /* Empieza fuera de pantalla */
    animation: marquee 25s linear infinite;
    will-change: transform; /* Suavidad extra en iPhone */
    width: max-content; /* Importante para que no se corte */
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

#nowPlaying {
    font-size: 2rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
}

#artistInfo {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.7);
}

#albumInfo {
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

#nowPlaying, #artistInfo, #albumInfo {
    text-align: center;
    width: 100%;
}

#nowPlaying {
    min-height: 2.5rem;
}

#artistInfo {
    min-height: 1.8rem;
}

#albumInfo {
    min-height: 1.5rem;
}

/* --- CONTROLES MÓVIL --- */

.controls-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

/* 🔘 BOTÓN GLASS REAL */

#playBtn {
    width: clamp(70px, 22vw, 90px);
    height: clamp(70px, 22vw, 90px);

    flex-shrink: 0; /* 🔥 evita deformación */

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    transition: all 0.3s ease;

    /* glass base */
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(255,255,255,0.15);

    position: relative;
}

/* 🎨 estado PLAYING */
#playBtn.playing {
    background: rgba(var(--accent,255,0,0), 0.15);
    border: 2px solid rgba(var(--accent,255,0,0), 0.6);

    box-shadow:
        0 0 20px rgba(var(--accent,255,0,0), 0.6),
        0 0 40px rgba(var(--accent,255,0,0), 0.3);
}

/* ⚪ estado PAUSED */
#playBtn.paused {
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.2);

    box-shadow: none;
}

/* iconos */
.icon-svg {
    width: 34px;
    height: 34px;
    fill: white;
}

/* ocultar */
.hidden {
    display: none;
}



/* 👇 feedback táctil */
#playBtn:active {
    transform: scale(0.92);
}

/* 👇 feedback táctil */
#playBtn:active {
    transform: scale(0.92);
}

/* --- SELECTOR DE CALIDAD --- */

.quality-btn {
    min-width: 90px;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    font-family: 'Markazi Text', serif;
    font-size: 14px;
    line-height: 1.1;

    cursor: pointer;
    transition: all 0.25s ease;

    /* glass base */
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 14px;

    color: white;
}

/* 🔴 ACTIVO */
.quality-btn.active {
    background: rgba(var(--accent,255,0,0), 0.15);
    border: 2px solid rgba(var(--accent,255,0,0), 0.6);

    box-shadow:
        0 0 12px rgba(var(--accent,255,0,0), 0.5),
        0 0 25px rgba(var(--accent,255,0,0), 0.25);
}

/* ⚪ INACTIVO */
.quality-btn:not(.active) {
    opacity: 0.7;
}

/* hover suave (solo desktop) */
@media (hover: hover) {
    .quality-btn:hover {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Volumen Móvil */

.volume-container {
    width: 80%;
    margin: 20px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    /* ✨ glass effect */
    padding: 10px 14px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
}

/* slider base */
#volume-slider {
    flex: 1;
    appearance: none;
    height: 4px;
    border-radius: 10px;
    outline: none;

    /* 🎨 color dinámico */
    background: linear-gradient(
        to right,
        rgb(var(--accent, 255,255,255)) 0%,
        rgba(255,255,255,0.2) 0%
    );
}

/* thumb */
#volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#volume-slider:active::-webkit-slider-thumb {
    transform: scale(1.2);
}

#volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
}

/* iconos */
.vol-icon {
    width: 18px;
    height: 18px;
    fill: white;
    opacity: 0.7;
}

/* 📱 horizontal */
@media (orientation: landscape) {
    .volume-container {
        margin: 10px 0 0 0;
        justify-content: flex-start;
        max-width: 350px;
    }
}

/* --- AJUSTE PARA MÓVIL EN HORIZONTAL (LANDSCAPE) --- */
@media screen and (max-height: 480px) and (orientation: landscape) {
    #app-shell {
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 40px !important;
        /* Evita que el Notch tape la foto */
        padding-left: calc(20px + env(safe-area-inset-left)) !important;
        padding-right: calc(20px + env(safe-area-inset-right)) !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    .album-wrapper {
        /* Hacemos que la foto sea lo más grande posible según el alto */
        width: 80vh !important; 
        height: 80vh !important;
        max-width: 300px !important;
        max-height: 300px !important;
        flex: 0 0 auto !important; /* Evita que se encoja */
    }

    .col-derecha-radio {
        align-items: flex-start !important;
        text-align: left !important;
        max-width: 400px !important;
        justify-content: center !important;
        gap: 5px !important;
    }

    /* Reducimos textos para que quepan en dos columnas de lado */
    .radio-brand-fixed { font-size: 2.8rem !important; text-align: left !important; }
    #nowPlaying { font-size: 2rem !important; }
    #artistInfo { font-size: 1.6rem !important; }
    #albumInfo { font-size: 1rem !important; }
    
    #nowPlaying, #artistInfo, #albumInfo {
    text-align: left;
}

    .controls-wrapper {
        width: 80%;
        flex-direction: row !important;
        margin-top: 10px !important;
        margin-left: 0;
        gap: 10px !important;
        justify-content: flex-start !important;
    }

    #playBtn {
        width: 70px !important;
        height: 70px !important;
    }
    
        .icon-svg {
        width: 30px !important;
        height: 30px !important;
    }
}

/* --- 2. VISTA ESCRITORIO (HORIZONTAL) --- */
@media screen and (min-width: 769px) and (min-height: 501px) {
    #app-shell {
        flex-direction: row;
        justify-content: center;
        gap: 6vw;
        height: 100vh;
    }

    .album-wrapper {
        width: 40vw !important; /* Proporcional al ancho del monitor */
        height: 40vw !important;
        max-width: 500px !important;
        max-height: 500px !important;
    }

    .col-derecha-radio {
        display: flex !important;
        flex-direction: column !important;
        /* Cambiamos center por flex-start para alinear a la izquierda */
        align-items: flex-start !important; /* Vuelve a la izquierda en PC */
        text-align: left !important;
        width: 45vw !important;
        max-width: 600px;
        height: 500px; /* O el max-height de tu carátula */
        justify-content: space-between;    
    }

    .radio-brand-fixed {
        width: 100% !important;
        text-align: left !important; /* Fuerza el nombre de la radio a la izquierda */
        font-size: 4.5rem !important;
        font-weight: 700;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    #nowPlaying {
    font-size: 3rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
}

#artistInfo {
    font-size: 2.2rem;
    color: rgba(255,255,255,0.7);
}

#albumInfo {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}
    
    #nowPlaying, #artistInfo, #albumInfo {
        text-align: left !important;
    }

    .scroll-wrapper {
        width: 100% !important;
        text-align: left !important;
        justify-content: flex-start !important;
    }


    .controls-wrapper {
        width: 60%;
        flex-direction: row; /* Play al lado de Volumen */
        align-items: center !important;
        justify-content: flex-start !important;
        margin: 0;
        margin-left: 0;
    }
  

    #playBtn { width: 100px; height: 100px; }
   
}

/* --- BOTONES DE SISTEMA (MENU Y RELOAD) --- */
.menu-trigger, .reload-btn {
    position: fixed;
    top: 25px;
    z-index: 1000;
    width: 50px; height: 50px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.menu-trigger { left: 20px; }
.reload-btn { right: 20px; display: none; } /* Solo PWA */

@media (display-mode: standalone) {
    .reload-btn { display: flex; }
}

.menu-trigger span {
    width: 25px; height: 2px;
    background: white;
}

/* --- 5. ICONOS --- */
.icon-svg {
    width: 45%;
    height: 45%;
    fill: currentColor;
    filter: drop-shadow(0 0 8px rgba(0,0,0,0.5));
}

.hidden { display: none !important; }

/* --- CONFIGURACIÓN FINAL FEELING FM --- */
:root {
    /* Altura perfecta: Área segura + 20px para estar cerca del borde pero sin tocar la hora */
    --pwa-top: calc(env(safe-area-inset-top, 0px) + 20px);
}

/* --- REGLA MAESTRA DE DISEÑO (CRISTAL Y SOMBRA) --- */
body .menu-trigger, 
body .reload-btn {
    position: fixed !important;
    top: var(--pwa-top) !important;
    width: 46px !important; /* Un pelín más compactos para elegancia */
    height: 46px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    z-index: 9000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: white !important;
    /* Sombra para que resalten sobre cualquier carátula */
    filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.3)) !important;
}

/* --- POSICIONAMIENTO LATERAL --- */
body .menu-trigger {
    left: 20px !important;
    right: auto !important;
    flex-direction: column !important;
    gap: 4px !important;
}

body .reload-btn {
    right: 20px !important;
    left: auto !important;
    display: none !important; /* Oculto en el navegador */
}

/* --- VISIBILIDAD EXCLUSIVA PWA --- */
@media (display-mode: standalone) {
    body .reload-btn {
        display: flex !important;
    }
}

/* --- ESTILO DE ICONOS (BLANCO PURO) --- */
.reload-btn svg {
    width: 22px !important;
    height: 22px !important;
    stroke: white !important;
    stroke-width: 2;
    fill: none !important;
}

.menu-trigger span, 
.menu-trigger div,
.menu-trigger i {
    background-color: white !important;
    width: 20px !important;
    height: 2px !important;
    display: block !important;
}

/* Animación de rotación al pulsar */
.reload-btn:active svg {
    transform: rotate(360deg);
    transition: transform 0.5s ease;
}



@media (max-width: 768px) {
    .menu-trigger {
        top: 15px !important;
        left: 15px !important;
    }
}

.menu-trigger span {
    width: 27px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: 0.3s;
    cursor: pointer !important;
    pointer-events: auto !important; /* Fuerza a que responda al mouse */
    z-index: 9999 !important; /* Asegura que esté por encima de TODO */
}

/* --- PANEL DEL MENÚ (GLASS DARK) --- */
.side-menu {
    position: fixed;
    top: 0;
    left: -300px; /* Escondido */
    width: 280px;
    height: 100dvh;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    z-index: 10000;
    padding: calc(env(safe-area-inset-top) + 70px) 15px 20px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
}

.side-menu.active {
    transform: translateX(300px);
}

/* Ajuste para que el menú en PC no se desplace de más */

@media (min-width: 768px) {
    .side-menu.active {
        transform: translateX(300px) !important;
    }
    
    .side-menu {
        left: -300px !important;
    }
}


.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* --- BOTONES ESTILO iOS 26 --- */
.menu-section {
    margin-bottom: 25px;
}

/* --- UNIFICACIÓN DE FUENTES Y TITULOS --- */
.section-title, .ios-btn span {
    font-family: 'Markazi Text', serif !important;
    font-weight: 500 !important;
    font-size: 20px !important; /* Mismo tamaño para todos */
}

.section-title {
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    margin: 10px 0 12px 12px;
    letter-spacing: 1px;
}

.ios-btn {
    width: 100%;
    background: rgba(40, 40, 40, 0.4); /* Un poco más transparente */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 8px 12px; /* Reducimos padding para que no sea gigante */
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* --- COLORES INDIVIDUALES PARA ICONOS --- */

/* Solicitar (Rosa/Musical) */
.btn-solicitar svg { fill: #ff4d94 !important; filter: drop-shadow(0 0 5px rgba(255, 77, 148, 0.4)); }

/* Historial (Naranja/Reloj) */
.btn-historial svg { fill: #ff9500 !important; filter: drop-shadow(0 0 5px rgba(255, 149, 0, 0.4)); }

/* Facebook (Azul) */
.btn-facebook svg { fill: #1877f2 !important; filter: drop-shadow(0 0 5px rgba(24, 119, 242, 0.4)); }

/* Instagram (Degradado/Púrpura) */
.btn-instagram svg { fill: #ff3040 !important; filter: drop-shadow(0 0 5px rgba(255, 48, 64, 0.4)); }

/* WhatsApp (Verde) */
.btn-whatsapp svg { fill: #25d366 !important; filter: drop-shadow(0 0 5px rgba(37, 211, 102, 0.4)); }

/* TV (Azul Cielo) */
.btn-tv svg { fill: #5ac8fa !important; filter: drop-shadow(0 0 5px rgba(90, 200, 250, 0.4)); }

/* Compartir (Amarillo) */
.btn-compartir svg { fill: #ffcc00 !important; filter: drop-shadow(0 0 5px rgba(255, 204, 0, 0.4)); }

/* Efecto al presionar cualquier botón */
.ios-btn:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.96);
}
.ios-btn svg {
    width: 22px;
    height: 22px;
    fill: rgba(255, 255, 255, 0.9);
}

/* Ajuste del iframe para que empiece debajo de la barra */
#menuIframe {
    width: 100%;
    height: calc(100% - 60px);
    border: none;
    margin-top: 60px; /* Bajamos el iframe lo que mide el header */
}

/* ============================================================
   ESTILO iOS 26 DEFINITIVO - SIN BOTONES VIEJOS
   ============================================================ */

/* 1. ELIMINACIÓN RADICAL DEL BOTÓN (Para que no quede ni rastro) */
#iframeView button, 
.iframe-header button {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
}

/* 2. CONTENEDOR DEL MODAL */
#iframeView {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #000 !important;
    z-index: 10000 !important; /* Prioridad máxima */
    display: none; 
    flex-direction: column;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#iframeView.active {
    display: flex !important;
}

/* 3. HEADER ESTILO iOS 26 (Toda la barra superior) */
.iframe-header {
    width: 100% !important;
    height: 70px !important; /* Más alto para que sea fácil tocarlo */
    background: rgba(35, 35, 35, 0.7) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1) !important;
    cursor: pointer !important;
    /* Evita que se mueva por herencia */
    position: relative !important;
    top: 10 !important;
    left: 0 !important;
}

/* 4. LA RAYITA BLANCA (Grabber) */
.ios-grabber {
    width: 50px !important;
    height: 5px !important;
    background-color: rgba(255, 255, 255, 0.5) !important;
    border-radius: 10px !important;
    /* Bajamos la rayita para que libre el Notch/Isla Dinámica del iPhone */
    margin-top: calc(env(safe-area-inset-top, 20px) + 10px) !important;
    box-shadow: 0 0 15px rgba(0,0,0,0.3) !important;
}

/* 5. AJUSTE DEL CONTENIDO (IFRAME) */
#menuIframe {
    flex-grow: 1 !important;
    width: 100% !important;
    border: none !important;
    background: #000 !important;
}

@media (display-mode: standalone) {
    .iframe-header {
        height: calc(env(safe-area-inset-top, 0px) + 60px) !important;
        padding-top: env(safe-area-inset-top, 0px) !important;
    }
}

@keyframes breathe {
    0%   { filter: brightness(1); }
    50%  { filter: brightness(1.03); }
    100% { filter: brightness(1); }
}

