:root {
    --bg-light: #0f172a;
    --bg-gradient: radial-gradient(circle at top right, #1e293b, #0f172a);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-neon: #4db6ac; /* TURQUESA LOGO */
    --accent-glow: rgba(77, 182, 172, 0.4);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(148, 163, 184, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --success: #34d399;
    --alert: #fb7185;
    --logo-navy: #1b3a61; /* AZUL MARINO LOGO */
}

body.light-mode {
    --bg-light: #f1f5f9;
    --bg-gradient: radial-gradient(circle at top right, #ffffff, #f1f5f9);
    --text-primary: #1b3a61; /* AZUL MARINO PARA FUENTES */
    --text-secondary: #475569;
    --accent-neon: #4db6ac; 
    --accent-glow: rgba(77, 182, 172, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(27, 58, 97, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(27, 58, 97, 0.1);
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.hidden {
    display: none !important;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    position: relative;
    transition: background 0.8s ease;
}

.body-dimmed {
    background: #000 !important;
}

/* ==========================================
   PANTALLA 1: BIENVENIDA GLASS (v20.2)
   ========================================== */
.screen-welcome {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.4);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    z-index: 10000; /* v63.2: Elevado para cubrir el dashboard */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-content {
    max-width: 800px;
    padding: 3rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
    animation: alert-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.welcome-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.welcome-subtitle {
    font-size: 1.5rem;
    color: var(--accent-neon);
    font-weight: 600;
    margin-bottom: 2rem;
}

.massive-entry-btn {
    padding: 3rem 6rem;
    font-size: 3rem;
    font-weight: 900;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 20px 50px rgba(0,0,0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.massive-entry-btn:hover, .massive-entry-btn:focus {
    transform: scale(1.05);
    background: var(--logo-navy);
    color: var(--accent-neon);
    border-color: var(--accent-neon);
    box-shadow: 0 0 60px var(--accent-glow), 0 0 20px var(--accent-neon);
}

.welcome-subtitle {
    margin-top: 2rem;
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================
   PANTALLA 2: DASHBOARD
   ========================================== */
.tv-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: transparent;
}

/* Status Bar */
.status-top {
    padding: 2.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 5000;
}

.header-right-side {
    display: flex;
    align-items: center;
    gap: 30px;
}
.status-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: 0.8rem 2rem;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
}
.status-pill { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }

/* --- THEME SWITCH PREMIUM v57 --- */
.theme-switch {
    position: fixed;
    top: 35px;
    right: 180px; /* Al lado del reloj */
    width: 100px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid var(--accent-neon);
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 0 30px var(--accent-neon);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    z-index: 6000; /* v63.2: Sobre el status-top pero bajo los modales */
}

.switch-thumb {
    position: absolute;
    top: 4px;
    left: 5px;
    width: 36px;
    height: 36px;
    background: var(--accent-neon);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--logo-navy);
    font-size: 1.4rem;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.theme-switch .light-icon { opacity: 0; position: absolute; transform: scale(0); transition: 0.3s; }
.theme-switch .dark-icon { opacity: 1; position: absolute; transform: scale(1); transition: 0.3s; }

body.light-mode .theme-switch {
    background: rgba(27, 58, 97, 0.1);
}

body.light-mode .switch-thumb {
    left: calc(100% - 41px);
    background: var(--logo-navy);
    color: white;
}

body.light-mode .light-icon { opacity: 1; transform: scale(1); }
body.light-mode .dark-icon { opacity: 0; transform: scale(0); }

.theme-switch:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--accent-neon);
}

.time { font-size: 1.8rem; font-weight: 800; color: var(--text-primary); }

.status-indicator-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* v66.1: Forzar visibilidad en la pantalla de entrada */
.theme-switch-entrance {
    position: absolute !important;
    top: 130px; /* Ajustado para quedar bajo 'Escuchando' pero en la capa de arriba */
    left: 4rem;
    z-index: 20000 !important;
    display: flex !important;
}

/* Ocultar en el dashboard real */
body:not(.showing-entrance) .theme-switch-entrance {
    display: none !important;
}

.mute-pill {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 0.4rem 1.2rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(239, 68, 68, 0.3);
    margin-left: 1rem;
    animation: fadeIn 0.3s ease;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mute-pill:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.05);
}

.mute-pill.hidden { display: none; }

.dot { width: 14px; height: 14px; border-radius: 50%; background: #94a3b8; }
.dot.listening { background: #10b981; box-shadow: 0 0 15px #10b981; animation: pulse-dot 1.5s infinite; }
.dot.thinking { background: #f59e0b; box-shadow: 0 0 15px #f59e0b; }
.dot.speaking { background: var(--accent-neon); box-shadow: 0 0 15px var(--accent-neon); }

@keyframes pulse-dot { 0% { transform: scale(1); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } }

/* UI Arena */
.ui-arena {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.interaction-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.elliptical-avatar {
    width: 32vmin;
    height: 32vmin;
    max-width: 320px;
    max-height: 320px;
    position: relative;
    background: var(--glass-bg);
    border-radius: 50% / 60% 60% 40% 40%;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto;
    z-index: 5;
}

.aura-breath {
    position: absolute;
    width: 140%;
    height: 140%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    animation: aura-breath 4s ease-in-out infinite;
    z-index: -1;
}

@keyframes aura-breath {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.15); opacity: 0.6; }
}

.bpm-indicator {
    position: absolute;
    bottom: -15px;
    right: -15px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 1.4rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: pulse-heart-premium 0.8s infinite alternate;
    z-index: 10;
}

@keyframes pulse-heart-premium {
    from { transform: scale(1); box-shadow: 0 0 15px rgba(239, 68, 68, 0.4); }
    to { transform: scale(1.15); box-shadow: 0 0 35px rgba(239, 68, 68, 0.8); }
}

.avatar-glow {
    position: absolute;
    top: -10%; left: -10%; width: 120%; height: 120%;
    background: radial-gradient(circle, var(--accent-neon) 0%, transparent 70%);
    opacity: 0.3;
    border-radius: 50%;
    filter: blur(20px);
    transition: all 0.5s ease;
}

/* AnimaciÃ³n cuando VIVA habla */
.elliptical-avatar.talking-anim {
    border-color: var(--accent-neon);
    box-shadow: 0 0 50px rgba(var(--accent-neon-rgb), 0.5);
    transform: scale(1.02);
}

.elliptical-avatar.talking-anim .avatar-glow {
    opacity: 0.6;
    animation: pulseAura 1.5s infinite ease-in-out;
}

@keyframes pulseAura {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;

    z-index: 2;
}

.thinking-anim .avatar-glow {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.4) 0%, transparent 70%);
    animation: pulse-avatar 1s infinite ease-in-out;
}

/* TranscripciÃ³n Gigante - Autoregulada */
.transcription-container {
    max-width: 90%;
    min-height: 10vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viva-prompt {
    font-size: 2.2rem;
    color: var(--accent-neon);
    font-weight: 600;
    margin-bottom: 1rem;
    opacity: 0.8;
    animation: pulsePrompt 3s infinite ease-in-out;
}

@keyframes pulsePrompt {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

#subtitles {
    font-size: 6vmin;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
    color: var(--text-primary);
    text-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: color 0.5s ease;
}

/* v65.1: Mejora de contraste para Modo Claro */
body.light-mode #subtitles {
    color: var(--logo-navy) !important;
    text-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ==========================================
   ÃREA DE SUGERENCIAS (TARJETAS)
   ========================================== */
.suggestions-area {
    padding: 2vh 4vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2vmin;
    width: 100%;
    max-width: 1600px;
}

.sugg-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1.5px solid var(--accent-neon);
    border-radius: 2.5vmin;
    padding: 1.5vmin 2vmin;
    display: flex;
    align-items: center;
    gap: 1.5vmin;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.sugg-card:hover {
    transform: translateY(-10px);
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(0, 210, 255, 0.15);
    border-color: var(--accent-neon);
}

.sugg-icon {
    font-size: 4vmin;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-neon);
    transition: color 0.3s ease;
}

.sugg-card:hover .sugg-icon {
    color: var(--logo-navy);
}


.sugg-text h3 {
    margin-bottom: 0.2rem;
}

.sugg-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.sugg-card.highlight {
    /* v89: Unificado con el resto */
    border-width: 1.5px;
}

#version-tag {
    margin-top: 2rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(0,0,0,0.2);
}

/* ==========================================
   MODAL HÃBLAME (RESULTADOS INTERNET)
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    z-index: 20000; /* v63.2: El nivel mÃ¡s alto para evitar solapamiento con el reloj */
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-modal {
    width: 80%;
    max-width: 1000px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 4rem;
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.modal-body {
    flex: 1;
}

.massive-close-btn {
    padding: 1.5rem 4rem;
    font-size: 1.8rem;
    font-weight: 900;
    border-radius: 99px;
    border: none;
    background: #0f172a;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.massive-close-btn:hover {
    background: var(--alert);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
}

/* Demos */
.weather-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}
.weather-icon { font-size: 8rem; }
.weather-info { text-align: left; }
.temp { font-size: 6rem; font-weight: 900; display: block; }
.city { font-size: 2.5rem; font-weight: 700; color: var(--text-secondary); }
.weather-desc { font-size: 1.5rem; font-weight: 600; margin-top: 1rem; }

.map-placeholder {
    height: 300px;
    background: rgba(0,0,0,0.05);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    border: 2px dashed rgba(0,0,0,0.1);
}

/* ==========================================
   SOS ALERT
   ========================================== */
/* MODAL AGENDA WIDE (TV-OPTI v13.0) */
.glass-modal.wide {
    max-width: 95vw;
    width: 95vw;
    height: 94vh; /* Casi pantalla completa */
    padding: 1rem 3rem; /* Reducido para ahorrar espacio vertical */
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5rem; /* Reducido drÃ¡sticamente */
    padding-bottom: 0.5rem; /* Reducido drÃ¡sticamente */
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 1000;
    margin: 0;
    color: var(--accent-neon); /* Color neÃ³n distintivo de VIVA */
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--accent-glow);
}

.btn-close-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem; /* BotÃ³n CERRAR mÃ¡s compacto */
    border-radius: 12px;
    font-weight: 900;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-close-red:hover {
    transform: scale(1.1);
    background: #b91c1c;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

.agenda-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
    overflow: hidden; /* Importante para que el formulario no se vaya abajo */
}

.contacts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 2rem;
    width: 100%;
    flex: 1;
    overflow-y: auto; /* Solo la lista de contactos hace scroll si hay muchos */
    padding-right: 1.5rem; /* Espacio para el scrollbar sin pisar botones */
}

.contact-card-v2 {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255,255,255,0.2);
}

.contact-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.2);
}

.card-action-header {
    background: linear-gradient(135deg, #10b981, #059669); /* Verde vibrante */
    color: white;
    padding: 0.8rem 1rem; /* MÃ¡s compacto */
    text-align: center;
    font-weight: 900;
    font-size: 1.1rem; /* Un pelÃ­n mÃ¡s pequeÃ±a */
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-identity-body {
    padding: 1.2rem 1rem; /* Mucho mÃ¡s compacto verticalmente */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: #ffffff;
    min-height: 80px; /* Asegura espacio para el nombre */
}

.card-name {
    font-size: 1.8rem; /* TamaÃ±o optimizado v16.2 */
    font-weight: 950;
    color: var(--logo-navy);
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-delete-corner {
    position: absolute;
    bottom: 0.8rem;
    right: 0.8rem;
    background: white; /* Invertido: Fondo blanco */
    color: #ef4444;    /* Invertido: Icono rojo */
    border: 1px solid #ef4444;
    font-size: 1.1rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    z-index: 10;
}

.card-delete-corner:hover {
    transform: scale(1.1);
    background: #fff5f5;
    color: #ff0000;
}

.contact-item {
    background: rgba(255,255,255,0.8);
    border: 2px solid var(--glass-border);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.contact-name { font-size: 1.6rem; font-weight: 900; color: #0f172a; }
.contact-phone { font-size: 1.1rem; color: #64748b; font-weight: 700; }

.btn-call-contact {
    background: var(--success);
    color: white;
    border: none;
    padding: 1rem 2.5rem; /* MÃ¡s grandes como pedido */
    border-radius: 15px;
    font-weight: 900;
    font-size: 1.3rem; 
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-call-contact:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4);
}

.btn-delete {
    background: white; /* Invertido: Fondo blanco */
    color: #ef4444;    /* Invertido: Icono rojo */
    border: 2px solid #ef4444;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}
.btn-delete:hover { 
    transform: scale(1.1); 
    background: #fff5f5;
    color: #ff0000;
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.3);
}

/* ==========================================
   CINEMATIC VIDEO CALL v12.0
   ========================================== */
.call-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
}

.call-glass-container {
    width: 85vw; /* MÃ¡s ancho para aprovechar la TV */
    height: 85vh; /* MÃ¡s alto para ver mejor al familiar */
    background: var(--glass-bg);
    border: 2px solid var(--accent-neon);
    border-radius: 40px;
    box-shadow: 0 0 50px rgba(0, 210, 255, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.call-header {
    background: rgba(0,0,0,0.5);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.live-indicator {
    color: #ef4444;
    font-weight: 800;
    animation: pulseAura 1s infinite alternate;
}

.call-status {
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

.jitsi-tv-frame {
    flex: 1;
    background: #000;
}

.call-footer {
    padding: 1rem; /* Reducido a la mitad */
    background: rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
}

.btn-hangup {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.8rem 4rem; /* Reducido significativamente */
    font-size: 1.2rem; /* Texto mÃ¡s discreto */
    font-weight: 900;
    border-radius: 99px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-hangup:hover {
    transform: scale(1.1);
    background: #dc2626;
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.6);
}


/* Formulario */
/* Formulario mÃ¡s discreto */
/* Formulario anclado abajo y compacto */
.add-contact-form {
    background: rgba(255,255,255,0.06);
    border: 1px dashed var(--glass-border);
    padding: 1rem 1.5rem;
    border-radius: 20px;
    margin-top: auto;    /* Magia: centra verticalmente en el espacio libre */
    margin-bottom: auto; /* Magia: centra verticalmente en el espacio libre */
    flex-shrink: 0;
}

.add-contact-form h3 { margin-bottom: 0.8rem; font-size: 1.1rem; text-align: center; opacity: 0.9; }

.form-row {
    display: flex;
    gap: 1.5rem;
    align-items: center; /* AlineaciÃ³n perfecta */
}

.form-row input, .form-row select {
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    font-size: 0.9rem;
    font-family: inherit;
    flex: 1;
    min-width: 150px;
}

/* v13.0 Eliminamos el botÃ³n de abajo para que la agenda crezca */
.btn-close-agenda { display: none !important; }
.massive.hub-close-btn { 
    display: none !important; /* Ahora usamos el botÃ³n en el header estilo Agenda */
}

.btn-add {
    background: var(--accent-neon);
    color: var(--logo-navy);
    border: none;
    padding: 1rem 3rem;
    border-radius: 15px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-add:hover {
    box-shadow: 0 0 20px var(--accent-glow);
    transform: scale(1.05);
}

/* v32.0: Button Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
    cursor: wait;
}

.btn-loading span {
    visibility: hidden;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    top: calc(50% - 12px);
    left: calc(50% - 12px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: button-spinner 0.6s linear infinite;
}

@keyframes button-spinner {
    to { transform: rotate(360deg); }
}

#notification-overlay {
    z-index: 3000 !important; /* Prioridad mÃ¡xima sobre cualquier otro modal o dashboard v20.5 */
}

/* ALERTA DE RECORDATORIO ACTIVA (v20.5 Suprema) */
.alert-modal {
    max-width: 405px; /* Reducido otro 25% (75% de 540px) */
    width: 40vw;      
    padding: 1.8rem 1.5rem; 
    text-align: center;
    border: 3px solid var(--accent-neon);
    background: rgba(15, 23, 42, 0.98);
    border-radius: 35px;
    box-shadow: 0 0 50px rgba(56, 189, 248, 0.4);
    animation: alert-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

@keyframes alert-pop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.alert-icon {
    font-size: 5.5rem; /* Ajustado proporcionalmente */
    margin-bottom: 0.2rem;
    animation: pulse-avatar 2s infinite ease-in-out;
}

#notif-title {
    font-size: 2.4rem; /* Ajustado proporcionalmente */
    font-weight: 900;
    color: var(--accent-neon);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

#notif-desc {
    font-size: 2.4rem; /* Ajustado proporcionalmente */
    font-weight: 800;
    color: white;
    margin: 0;
}

.notif-meta {
    font-size: 1.6rem; /* Ajustado proporcionalmente */
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.6rem 2rem;
    border-radius: 100px;
    font-weight: 700;
    margin: 0.4rem 0;
}

/* NUEVOS ESTILOS CABECERA MIREMOS v98.4 */
.hub-header-v2 {
    display: flex;
    align-items: center;
    padding: 1.5rem 2.5rem;
    position: relative;
    border-bottom: 1px solid rgba(0, 210, 255, 0.2);
    background: #021a1b;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    gap: 0;
    flex-wrap: nowrap;
}

.hub-header-v2 .hub-header-left {
    width: 250px;
    flex-shrink: 0;
}

.hub-header-v2 .hub-header-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hub-header-v2 .hub-logo-center-wrap {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hub-header-v2 .hub-header-right {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
}

.hub-header-v2 .hub-search-viva {
    width: 100%;
    max-width: 400px;
    margin: 0;
    height: 45px;
}

.hub-header-v2 .hub-search-viva input {
    background: transparent !important;
    color: white;
}

.hub-header-v2 .hub-search-viva input:-webkit-autofill,
.hub-header-v2 .hub-search-viva input:-webkit-autofill:hover,
.hub-header-v2 .hub-search-viva input:-webkit-autofill:focus {
    -webkit-text-fill-color: white !important;
    -webkit-box-shadow: 0 0 0px 1000px #021a1b inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

.hub-header-v2 .viva-logo-dashboard {
    position: static;
    transform: none;
    width: 85px;
    height: 85px;
    box-shadow: none !important; /* Luz eliminada */
    border: 2px solid rgba(255,255,255,0.2);
}

.hub-header-v2 .btn-close-red {
    padding: 10px 25px;
    font-size: 1rem;
    white-space: nowrap;
    margin-right: 0;
}

.btn-visor-left {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10000;
}

/* Clases para eliminar inline styles v98.5 */
.hub-header-v2 .modal-title {
    margin: 0;
    color: var(--accent-neon);
    font-weight: 900;
}

.hub-header-v2 .viva-yt-badge {
    margin: 0;
}

.hub-header-v2 .viva-logo-dashboard img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* NUEVA LIKNEA DE CUENTA ATRÃ S v20.5 */
.countdown-text {
    font-size: 2rem; /* Ajustado proporcionalmente */
    font-weight: 950;
    color: #ef4444; 
    text-transform: uppercase;
    animation: pulse-countdown 1s infinite alternate;
    margin-top: 0.5rem;
}

@keyframes pulse-countdown {
    from { transform: scale(1); filter: brightness(1); }
    to { transform: scale(1.05); filter: brightness(1.3); }
}

/* SELECTOR DE TV */
.tv-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem;
}

.tv-channel-card {
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}


.tv-channel-card:hover {
    background: rgba(var(--accent-neon-rgb), 0.2);
    border-color: var(--accent-neon);
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.channel-logo {
    font-size: 5rem;
}

/* ==========================================
   REBIRTH v13.0: HUB MULTIMEDIA CINEMÃTICO (Optimizado TV)
   ========================================== */
.glass-modal.giant.rebirth-layout {
    width: 96vw !important;
    max-width: none !important;
    height: 94vh !important;
    max-height: none !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: rgba(2, 26, 27, 0.95) !important; /* Verde profundo integrado */
    -webkit-backdrop-filter: blur(20px); /* Soporte para Safari primero */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 210, 255, 0.2) !important;
    border-radius: 30px !important;
}

.hub-header {
    height: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3rem;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9), transparent);
    z-index: 20;
    flex-shrink: 0;
}

.hub-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent-neon);
    margin: 0;
}

.hub-explanation {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    text-align: center;
    flex: 1;
}

.hub-cinema-zone {
    flex: 1;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #032c2d 0%, #021a1b 100%); /* Verde profundo VYBA */
    overflow: hidden;
}

.hub-status-bar {
    height: 100px; /* Aumentamos un poco para que respiren los botones */
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    border-top: 1px solid rgba(0, 210, 255, 0.2);
}

.cinema-frame {
    width: 100%;
    height: 100%;
    position: relative !important; /* Base para los botones */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hub-video-controls {
    position: absolute !important;
    right: 0 !important; /* v99.4: Forzando posición de escudo lateral */
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    bottom: auto !important;
    width: 330px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2147483647 !important;
    background: transparent !important; /* El botón ya tiene su fondo */
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.btn-fullscreen-toggle {
    background: #000 !important; /* Negro sÃ³lido en reposo */
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-fullscreen-toggle:hover {
    background: var(--accent-neon);
    color: black;
    transform: scale(1.05);
}

.yt-external-btn {
    background: rgba(204, 0, 0, 0.8) !important;
    border-color: #ff0000 !important;
}

.cinema-frame img, .cinema-frame video, .cinema-frame iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

.hub-footer {
    height: 220px;
    background: linear-gradient(to top, var(--glass-bg), transparent);
    display: flex !important; /* Forzar visibilidad */
    flex-direction: column;
    padding: 10px 2rem;
    z-index: 20;
    flex-shrink: 0;
}

/* GALERÃA DE MINIATURAS v13.0 */
.media-gallery {
    display: flex !important;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
    width: 100%;
    -ms-overflow-style: none;  /* Hide scrollbar IE/Edge */
}

/* Ocultar en Firefox solo si es soportado (Evita advertencias IDE) */
@supports (scrollbar-width: none) {
    .media-gallery { scrollbar-width: none; }
}

.media-gallery::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}

.gallery-scroll {
    display: flex;
    gap: 15px;
}

.media-item {
    width: 240px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.media-item:hover {
    transform: scale(1.05) translateY(-5px);
    border-color: var(--accent-neon);
    box-shadow: 0 10px 20px rgba(0, 210, 255, 0.3);
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item .video-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    color: white;
}

.media-item .video-thumb i {
    font-size: 2.5rem;
    margin-bottom: 5px;
    color: var(--accent-neon);
}

.video-label {
    display: none !important;
}

.media-item .delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: 0.2s;
    z-index: 5;
}

.media-item:hover .delete-btn {
    opacity: 1;
}

.media-item .delete-btn:hover {
    background: #ef4444;
    transform: scale(1.1);
}

.hub-loading-overlay {
    background: #000;
    z-index: 30;
}

/* --- AGENDA FAMILIAR v20.6 (REPAIR) --- */
.agenda-container {
    flex: 1; 
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* El scroll vuelve aquÃ­ para estabilidad total */
    padding-right: 15px;
    margin-top: -10px;
}

/* Estilos estÃ¡ndar para navegadores modernos (Soportados en Chrome 121+, Firefox) */
@supports (scrollbar-width: thin) {
    .agenda-container {
        scrollbar-width: thin;
        scrollbar-color: var(--primary) transparent;
    }
}

/* Webkit Fallback (Chrome/Safari/Samsung TV) */
.agenda-container::-webkit-scrollbar {
    width: 6px;
}
.agenda-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}
.agenda-container::-webkit-scrollbar-track {
    background: transparent;
}

.contacts-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: min-content; /* Forzar a que cada fila respete su contenido */
    gap: 30px 25px; /* MÃ¡s espacio vertical entre filas */
    margin-bottom: 20px;
    align-items: start;
    flex-shrink: 0; /* No permitir que el grid se colapse */
}

.contact-block-grid {
    background: rgba(30, 41, 59, 0.85);
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* La altura ahora la define solo lo que hay dentro */
    transition: all 0.4s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.contact-block-grid:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.3);
}

.data-zone-v2 {
    padding: 10px 10px; /* Al mÃ­nimo para acercar botones */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    /* flex-grow: 1 eliminado: los botones suben pegados al texto */
}

.block-name {
    font-size: 1.7rem; /* Reducido un 15% de 2rem */
    font-weight: 1000;
    color: white;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.block-tag {
    background: #10b981;
    color: white;
    padding: 4px 15px; /* MÃ¡s compacto */
    border-radius: 25px;
    font-weight: 900;
    font-size: 0.95rem; /* Reducido un 15% de 1.1rem */
    margin-bottom: 6px;
    text-transform: uppercase;
}

.block-phone {
    color: rgba(255,255,255,0.7);
    font-size: 1.1rem; /* Reducido de 1.3rem */
    font-weight: 700;
}

.action-zone-v2 {
    background: rgba(0,0,0,0.2);
    padding: 10px 15px; /* MÃ¡s compacto para subir botones */
    display: flex;
    gap: 12px;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.viva-btn-green {
    background: #10b981 !important;
    color: white !important;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-weight: 1000;
    font-size: 1.1rem; /* Reducido de 1.2rem */
    flex-grow: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.3s;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.viva-btn-red-icon {
    background: #ef4444 !important; /* Rojo sÃ³lido para la papelera */
    color: white !important;
    border: none;
    min-width: 65px;
    height: 65px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.viva-btn-green:hover { transform: scale(1.05); background: #059669 !important; box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6); }
.viva-btn-red-icon:hover { transform: scale(1.1) rotate(5deg); background: #dc2626 !important; }

/* --- MODO CINEMATOGRÃ FICO v20.5 (SUPREMA) --- */
.btn-fullscreen-toggle {
    position: relative; /* Cambiado de absolute para que funcione en flex */
    background: #000 !important; /* Negro sÃ³lido para tapar botones de YT */
    color: var(--accent-neon);
    border: 2px solid var(--accent-neon);
    padding: 0.6rem 1.2rem; /* Más compacto */
    border-radius: 30px;
    font-weight: 800;
    font-size: 0.9rem; /* Mucho más pequeño para TV */
    cursor: pointer;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    z-index: 2147483647 !important; /* MÃ¡ximo z-index para tapar YT SIEMPRE */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 15px var(--accent-glow);
    white-space: nowrap;
}

.btn-fullscreen-toggle:hover {
    background: rgba(56, 189, 248, 0.95) !important; /* var(--accent-neon) ligeramente translÃºcido al accionar */
    color: #0f172a;
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--accent-neon);
}

/* v92.6: Eliminado posicionamiento absoluto redundante para evitar botones 'en medio' */

/* Forzar que el modal mismo sea pantalla completa */
.media-fullscreen .glass-modal.giant.rebirth-layout {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background: black !important;
    border: none !important;
}

.media-fullscreen .hub-cinema-zone {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    height: 100vh !important;
    max-height: 100vh !important;
    width: 100vw !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: radial-gradient(circle at center, #032c2d 0%, #021a1b 100%) !important; /* Verde VYBA */
}

.media-fullscreen .cinema-frame:not(.hidden) {
    width: 100vw !important;
    height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
}

.media-fullscreen .cinema-frame.hidden {
    display: none !important;
}

.media-fullscreen .cinema-img,
.media-fullscreen video,
.media-fullscreen iframe {
    box-shadow: 0 0 50px rgba(0,0,0,0.9);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    animation: blur-in-cinematic 1.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.media-fullscreen .cinema-img,
.media-fullscreen video {
    max-width: 90vw !important;
    max-height: 85vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

.media-fullscreen iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
    display: block;
}

/* v99.8: POSICIÓN FINAL QUIRÚRGICA (Petición Usuario) */
.media-fullscreen #rich-video-container {
    width: 100vw !important;
    height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    background: #000 !important;
    z-index: 10000;
}

.media-fullscreen iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
}

/* El parche negro: Blindaje total bajo la línea de tiempo */
.media-fullscreen .yt-shield-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 60px !important; /* Subido para asegurar cobertura total de logos e iconos */
    background: #000 !important;
    z-index: 2000000 !important;
    display: none; 
    align-items: center;
    justify-content: flex-end;
}

.media-fullscreen .yt-shield-bar {
    display: flex !important;
}

/* Base: Oculto por defecto en el dashboard */
.btn-exit-fullscreen-viva {
    display: none;
}

/* El botón VOLVER: Elevado y en 2 alturas (Petición Usuario) */
.media-fullscreen .btn-exit-fullscreen-viva {
    position: fixed !important;
    bottom: 25px !important; /* Subido sustancialmente para disimular flechas */
    right: 15px !important;
    height: 110px !important; /* Más alto para acomodar 2 líneas */
    width: 220px !important;
    background: #000 !important;
    border: 3px solid var(--accent-neon) !important;
    border-radius: 40px !important; /* Redondeado total para estilo moderno */
    color: var(--accent-neon) !important;
    font-size: 1.4rem !important;
    font-weight: 1000;
    line-height: 1.1; /* Ajuste para las 2 líneas */
    display: flex !important;
    flex-direction: column; /* Stacking icon and text */
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    z-index: 2147483647 !important;
    box-shadow: 0 0 40px rgba(0,0,0,0.9), 0 0 15px var(--accent-glow);
    text-align: center;
}

.media-fullscreen .btn-exit-fullscreen-viva i {
    font-size: 1.2rem;
    margin: 0;
}

.media-fullscreen .btn-exit-fullscreen-viva:hover {
    background: var(--accent-neon) !important;
    color: #000 !important;
}

@keyframes blur-in-cinematic {
    0% { filter: blur(30px); transform: scale(1.1); opacity: 0; }
    100% { filter: blur(0); transform: scale(1); opacity: 1; }
}

/* BotÃ³n NeÃ³n Premium */
.btn-viva-neon {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 2px solid var(--accent-neon) !important;
    color: var(--accent-neon) !important;
    box-shadow: 0 0 25px var(--accent-glow) !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-fullscreen-active {
    top: auto !important;
    bottom: 50px !important;
    right: 50px !important;
    opacity: 0.4;
    transform: scale(0.9);
}

.btn-fullscreen-active:hover {
    opacity: 1;
    transform: scale(1);
}

/* v95.6: Controles de Vídeo en el Hub Miremos */
.hub-video-controls {
    position: absolute;
    right: 0 !important; /* v99.4: Pegado al extremo derecho para tapar la rueda */
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 330px !important; /* v99.4: Compensación de ancho para cubrir "Más vídeos" */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2147483647 !important; /* MÃ¡ximo z-index absoluto */
    pointer-events: auto;
    animation: fadeIn 0.5s ease-out;
}

.hub-video-controls .btn-viva-neon {
    padding: 10px 25px !important;
    font-size: 1rem !important;
    border-radius: 50px !important;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}

/* v95.6: Ocultar controles de ampliación cuando ya estamos en pantalla completa */
.media-fullscreen .hub-video-controls {
    display: none !important;
}

@keyframes slide-in-back {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.btn-exit-fullscreen-viva:hover {
    background: var(--accent-neon);
    color: #0f172a;
    transform: scale(1.05);
}

.media-fullscreen .btn-fullscreen-toggle {
    display: none !important; /* Ocultar botones de ampliar cuando ya estamos en FS */
}

.media-fullscreen .hub-header,
.media-fullscreen .hub-footer {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

/* --- ESTILOS DE VIDEOLLAMADA v30.0 FINAL --- */
.call-overlay { 
    position: fixed; 
    top: 0; left: 0; 
    width: 100vw; height: 100vh; 
    background: rgba(0,0,0,0.9); 
    z-index: 99999; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    pointer-events: auto !important; 
}

.call-glass-container { 
    width: 95%; height: 95%; 
    background: rgba(255,255,255,0.1); 
    -webkit-backdrop-filter: blur(25px); 
    backdrop-filter: blur(25px); 
    border-radius: 40px; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    border: 1px solid rgba(255,255,255,0.2); 
}

.jitsi-tv-frame { 
    flex: 1; 
    width: 100%; 
    height: 100%; 
    background: #000; 
    position: relative; 
    z-index: 1; 
}

.call-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none;
}

.live-indicator {
    color: #ef4444;
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 1px;
    animation: blink 1.5s infinite;
}

@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }

.call-status {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    opacity: 0.8;
}

.call-footer { 
    height: 90px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: rgba(0,0,0,0.8); 
    position: relative; 
    z-index: 10000; 
    padding-bottom: 0px; 
}

.btn-hangup { 
    padding: 15px 45px; 
    background: #ef4444 !important; 
    color: white !important; 
    border: none !important; 
    border-radius: 40px !important; 
    font-size: 1.5rem !important; 
    font-weight: 900 !important; 
    cursor: pointer !important; 
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5) !important; 
    position: relative; 
    z-index: 100001; 
    transition: transform 0.2s; 
    pointer-events: auto !important; 
}

.btn-hangup:active { 
    transform: scale(0.9); 
}

/* ==========================================
   AZUL TV - CANAL PREMIUM
   ========================================== */
.tv-channel-card.premium-azul {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6) !important;
    border: 2px solid #60a5fa !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5) !important;
}

.tv-channel-card.premium-azul .channel-logo {
    font-size: 3rem !important;
}

.tv-channel-card.premium-azul .channel-name {
    color: white !important;
    font-weight: 900 !important;
    font-size: 1.4rem !important;
}



/* --- ESTILOS PERSONALIZADOS v20.8 (PETICIÓN USUARIO) --- */
.understood-btn-viva {
    max-width: 280px !important;
    padding: 12px 25px !important;
    font-size: 1.1rem !important;
    margin-bottom: 15px !important;
    border-radius: 50px !important;
    background: var(--accent-neon) !important;
    color: var(--logo-navy) !important;
}

.alert-text-content {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hub-interaction-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.hub-search-viva {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--accent-neon);
    border-radius: 50px;
    padding: 2px 10px;
    width: 350px;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.hub-search-viva input {
    background: transparent;
    border: none;
    color: white;
    padding: 8px 15px;
    flex: 1;
    font-size: 1rem;
    outline: none;
}

.hub-search-viva button {
    background: transparent;
    border: none;
    color: var(--accent-neon);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 10px;
}

.centered-header {
    justify-content: center !important;
}

.centered-navigation {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 40px !important;
    width: 100% !important;
}

.centered-navigation .status-badge, 
.centered-navigation .dash-lang-container,
.centered-navigation .theme-switch,
.centered-navigation .back-tv-btn {
    margin: 0 !important;
}


/* --- AJUSTE DE CENTRADO HUB v69.0 --- */
.hub-header .flex-between-w100 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.hub-interaction-group {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 10;
}


/* --- NUEVA ESTRUCTURA ALERTAS v71.0 --- */
.alert-modal {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 85vw !important;
    height: 85vh !important;
    padding: 50px !important;
    justify-content: flex-start !important;
}

.alert-main-title {
    font-size: 4.5rem !important;
    font-weight: 900 !important;
    color: var(--accent-neon) !important;
    margin: 0 0 20px 0 !important;
    text-transform: uppercase !important;
    text-align: center !important;
}

.alert-modal .notif-meta {
    background: rgba(255,255,255,0.1) !important;
    padding: 15px 60px !important;
    border-radius: 60px !important;
    font-size: 2.5rem !important;
    color: #cbd5e1 !important;
    margin-bottom: 25px !important;
    width: auto !important;
}

.notif-countdown {
    color: var(--alert) !important;
    font-size: 3.8rem !important;
    font-weight: 800 !important;
    margin-bottom: 30px !important;
    text-transform: uppercase !important;
    animation: pulse 1.5s infinite;
}

.understood-btn-viva {
    width: 60% !important;
    height: 110px !important;
    font-size: 2.8rem !important;
    border-radius: 55px !important;
    margin-bottom: 40px !important;
    background: var(--accent-neon) !important;
    color: var(--logo-navy) !important;
}

.alert-message-area {
    width: 100% !important;
    height: 40% !important; /* Espacio del 40% solicitado */
    background: rgba(0,0,0,0.2) !important;
    border: 2px dashed var(--glass-border) !important;
    border-radius: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 40px !important;
    overflow: hidden !important;
}

#notif-desc {
    font-size: 3.5rem !important;
    font-weight: 800 !important;
    text-align: center !important;
    color: #ffffff !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}


/* --- AJUSTE DE ESCALA ALERTAS v72.0 (TODO MÁS PEQUEÑO) --- */
.alert-modal {
    width: 70vw !important; /* Un poco menos ancha para que no pegue a los bordes */
    height: 80vh !important;
    padding: 30px !important;
    gap: 15px !important;
}

.alert-main-title {
    font-size: 2.2rem !important; /* Reducido a la mitad aprox */
    margin-bottom: 10px !important;
}

.alert-modal .notif-meta {
    padding: 8px 30px !important;
    font-size: 1.4rem !important;
    margin-bottom: 15px !important;
}

.notif-countdown {
    font-size: 2.2rem !important;
    margin-bottom: 15px !important;
}

.understood-btn-viva {
    width: 45% !important;
    height: 70px !important;
    font-size: 1.6rem !important;
    margin-bottom: 20px !important;
}

.alert-message-area {
    padding: 20px !important;
    border-radius: 25px !important;
}

#notif-desc {
    font-size: 2rem !important;
    line-height: 1.3 !important;
}


/* v89: MÁS ANCHO, MÁS BAJO Y BAJADO (Para evitar la píldora de voz) */
.alert-modal {
    width: clamp(400px, 80vw, 1000px) !important;
    height: auto !important;
    min-height: clamp(300px, 55vh, 650px) !important;
    max-width: 95% !important;
    max-height: 95% !important;
    display: flex !important;
    flex-direction: column !important;
    padding: clamp(10px, 3vh, 30px) !important;
    overflow: hidden !important; 
    margin: 20vh auto auto auto !important; /* Bajado a 20vh para evitar que toque el indicador */
    background: rgba(15, 23, 42, 0.98) !important;
    -webkit-backdrop-filter: blur(30px) !important;
    backdrop-filter: blur(30px) !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 40px !important;
    box-shadow: 0 0 50px rgba(0,0,0,0.8) !important;
}

.alert-main-title {
    font-size: clamp(1.4rem, 3.5vw, 2.2rem) !important; /* Más pequeña */
    line-height: 1 !important;
    margin-bottom: 1.5vh !important;
}

.alert-modal .notif-meta {
    font-size: clamp(1.1rem, 2.2vw, 1.6rem) !important; /* Más pequeña */
    padding: 1vh 4vw !important;
    margin-bottom: 1.5vh !important;
    background: rgba(255,255,255,0.05) !important;
}

.notif-countdown {
    font-size: clamp(1.4rem, 3.2vw, 2rem) !important; /* Más pequeña */
    margin-bottom: 1.5vh !important;
}

.understood-btn-viva {
    min-height: 50px !important;
    height: 6vh !important; /* Más bajo v89 */
    font-size: clamp(1.1rem, 2.2vw, 1.6rem) !important;
    width: clamp(200px, 45%, 350px) !important;
    margin-bottom: 2vh !important; 
}

.alert-message-area {
    width: 100% !important;
    flex: 1 !important; /* Que use todo el espacio restante abajo */
    min-height: 22vh !important; 
    background: rgba(0,0,0,0.5) !important;
    border-radius: 30px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    margin-bottom: 0 !important;
    overflow-y: auto !important; /* Solo el mensaje tiene scroll si es muy largo */
}

#notif-desc {
    font-size: clamp(1.5rem, 3vw, 2.5rem) !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}


/* --- SISTEMA DE AUTO-AJUSTE UNIVERSAL v74.0 (PRIORIDAD MÁXIMA) --- */
html {
    font-size: clamp(14px, 1.2vw, 18px) !important; /* Base dinámica */
}

.clock {
    font-size: clamp(2rem, 5vw, 4rem) !important;
    padding: 1vh 2vw !important;
}

.hub-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem) !important;
}

.viva-yt-badge {
    font-size: clamp(1rem, 2vw, 1.8rem) !important;
    padding: 1vh 3vw !important;
}

.hub-search-viva input {
    width: clamp(250px, 40vw, 600px) !important;
    height: clamp(50px, 8vh, 80px) !important;
    font-size: clamp(1.2rem, 2vw, 1.8rem) !important;
}

/* Tarjetas principales del Smart Hub */
.viva-card-premium {
    width: clamp(280px, 22vw, 450px) !important;
    height: clamp(350px, 50vh, 600px) !important;
    padding: clamp(15px, 3vh, 40px) !important;
}

.viva-card-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem) !important;
}

/* Ajuste de contenedores para evitar desbordamientos */
.flex-between-w100 {
    gap: 2vw !important;
}


/* --- AJUSTE FINAL BOTÓN ENTENDIDO v75.0 --- */
.understood-btn-viva {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important; /* Evitar que se rompa en 2 líneas */
    padding: 0 40px !important;
    line-height: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}


/* --- AJUSTE POSICIÓN AVATAR Y SUBTÍTULOS v76.0 --- */
.viva-hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important; /* Empezar desde arriba */
    padding-top: 2vh !important;
    height: auto !important;
    min-height: 70vh !important;
}

.avatar-container {
    margin-top: -5vh !important; /* Subir para que el tope esté a la altura del mic */
    margin-bottom: 4vh !important;
    transform: scale(0.9) !important; /* Un poco más pequeña para no saturar arriba */
    transition: all 0.5s ease !important;
}

.viva-avatar {
    width: clamp(150px, 20vh, 250px) !important;
    height: clamp(150px, 20vh, 250px) !important;
    border: 5px solid var(--accent-neon) !important;
    box-shadow: 0 0 30px var(--accent-glow) !important;
}

.viva-label {
    font-size: clamp(1rem, 2vw, 1.5rem) !important;
    margin-top: 10px !important;
    letter-spacing: 3px !important;
}

/* Espacio prioritario para el texto de la IA */
.subtitles-container {
    width: 85% !important;
    margin: 0 auto !important;
    padding: 2vh !important;
    min-height: 25vh !important; /* Más espacio para el texto */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.subtitles-text {
    font-size: clamp(2rem, 5vw, 4.5rem) !important; /* Texto MUCHO más grande e importante */
    font-weight: 800 !important;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5) !important;
    line-height: 1.2 !important;
}


/* --- AJUSTE LEVE POSICIÓN BOTONES INFERIORES v77.0 --- */
.viva-footer {
    bottom: 2vh !important; /* Subir un poco del borde inferior */
    padding-bottom: 2vh !important;
}

.grid-container-viva {
    gap: clamp(15px, 2vw, 30px) !important;
    padding: 0 4vw !important;
}

/* --- HUB MIREMOS: DISEÑO CINEMÁTICO SUPREMA (Optimizado v95.6) --- */
.hub-header {
    display: grid !important;
    grid-template-columns: 1fr 2fr 1fr !important;
    align-items: center !important;
    padding: clamp(20px, 4vh, 40px) 5vw !important;
    background: rgba(0,0,0,0.4) !important;
    border-bottom: 2px solid var(--glass-border) !important;
    min-height: 120px !important;
}

.hub-header-left { justify-self: start !important; }
.hub-header-right { justify-self: end !important; }
.hub-header-center {
    justify-self: center !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
}

.hub-title-small {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem) !important;
    color: var(--accent-neon) !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    margin: 0 !important;
}

.viva-yt-badge {
    background: rgba(255, 0, 0, 0.15) !important;
    border: 2px solid #ff0000 !important;
    color: white !important;
    padding: 8px 25px !important;
    border-radius: 50px !important;
    font-weight: 800 !important;
    font-size: 0.9rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3) !important;
}

.hub-search-viva {
    display: flex !important;
    width: clamp(300px, 45vw, 700px) !important;
    background: rgba(255,255,255,0.05) !important;
    border: 2px solid var(--accent-neon) !important;
    border-radius: 50px !important;
    padding: 2px 15px !important;
    transition: 0.3s !important;
    box-shadow: 0 0 20px var(--accent-glow) !important;
}

.hub-search-viva:focus-within {
    border-color: #4ade80 !important;
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.4) !important;
}

.hub-search-viva input {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    color: white !important;
    font-size: clamp(0.9rem, 1.2vw, 1.3rem) !important;
    padding: 10px !important;
    outline: none !important;
}

.hub-search-viva button {
    background: transparent !important;
    border: none !important;
    color: var(--accent-neon) !important;
    font-size: 1.4rem !important;
    cursor: pointer !important;
}

.btn-close-minimal {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid #ef4444 !important;
    color: #ef4444 !important;
    padding: 10px 25px !important;
    border-radius: 15px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    transition: 0.3s !important;
    text-transform: uppercase !important;
}

.btn-close-minimal:hover {
    background: #ef4444 !important;
    color: white !important;
}

.search-status-indicator {
    font-size: 0.85rem !important;
    color: #4ade80 !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    animation: fadeIn 0.3s ease-out;
}

.search-status-indicator {
    margin-top: 10px !important;
}



/* --- RECONSTRUCCIÓN DE MARCA DE AGUA Y AVATAR v88.0 --- */
.viva-avatar {
    width: clamp(160px, 22vh, 260px) !important;
    height: clamp(160px, 22vh, 260px) !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    clip-path: circle(50%) !important;
    object-fit: cover !important;
    border: 3px solid var(--accent-neon) !important;
    box-shadow: 0 0 50px var(--accent-glow) !important;
    background: white !important;
}

.avatar-container {
    padding: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%) !important;
}

.viva-watermark {
    position: fixed !important;
    top: 35px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    z-index: 99999 !important;
    opacity: 0.6 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease;
}

/* v89: ESCONDER MARCA DE AGUA CENTRAL EN MIREMOS, RECORDATORIOS Y AVISOS (Pero NO en Agenda) */
body:has(#reminders-modal:not(.hidden)) .viva-watermark,
body:has(#miremos-modal:not(.hidden)) .viva-watermark,
body:has(#notification-overlay:not(.hidden)) .viva-watermark,
body:has(#hub-app-modal:not(.hidden)) .viva-watermark {
    display: none !important;
}

.viva-watermark h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem) !important;
    color: #4db6ac !important;
    margin: 0 !important;
    line-height: 1 !important;
    letter-spacing: 2px !important;
}

.viva-watermark span {
    font-size: clamp(0.7rem, 1.2vw, 0.9rem) !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    letter-spacing: 3px !important;
}

/* OCULTACIÓN INTELIGENTE EN PANTALLA 1 */
body.showing-entrance .viva-watermark,
#start-overlay:not(.hidden) ~ .viva-watermark {
    display: none !important;
}

