
:root {
   
    --primary: #ff007f;          
    --primary-hover: #ff3399;    
    
   
    --success: #00e5ff;          
    --success-hover: #33ebff;
    --danger: #ff4444;           
    --danger-hover: #ff6666;
    
   
    --bg-base: #050509;          
    --bg-panel: #111119;         
    --bg-panel-light: #1a1a27;   
    
   
    --text-main: #ffffff;        
    --text-muted: #b0b0b0;       
    
   
    --border-color: #2a2a3a;     
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    
   
    --shadow-glow: 0 0 15px rgba(255, 0, 127, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow: hidden;
    overscroll-behavior-y: none;
    -webkit-tap-highlight-color: transparent;
}


::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-panel-light); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }


.hidden { display: none !important; }
.opacity-0 { opacity: 0 !important; pointer-events: none; }



.layout-login {
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: radial-gradient(circle at center, var(--bg-panel) 0%, var(--bg-base) 100%);
}


.layout-sala {
    height: 100dvh;
    width: 100vw;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .layout-sala { flex-direction: row; }
}


.login-card {
    background-color: var(--bg-panel);
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.login-header { text-align: center; margin-bottom: 1.5rem; }
.logo { color: var(--primary); font-size: 1.8rem; font-weight: bold; letter-spacing: 1px; }
.subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }

.form-group { margin-bottom: 1rem; position: relative; }
.checkbox-group { display: flex; align-items: center; gap: 0.5rem; padding-left: 0.25rem; }
.custom-checkbox { accent-color: var(--primary); width: 1rem; height: 1rem; cursor: pointer; }
.checkbox-group label { font-size: 0.85rem; color: var(--text-muted); cursor: pointer; }


.input-field {
    width: 100%;
    background-color: var(--bg-base);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    outline: none;
    transition: all 0.3s ease;
}
.input-field:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2); }

.btn-primary, .btn-success {
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary { 
    background: linear-gradient(135deg, var(--primary), #cc0066); 
    color: white; 
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.4); 
}
.btn-primary:hover { 
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 0, 127, 0.6); 
}

.btn-success { 
   
    background: linear-gradient(135deg, #00e5ff, #00b0ff); 
    
   
    color: #050509; 
    
    margin-top: 0.5rem;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}

.btn-success:hover { 
    background: linear-gradient(135deg, #33ebff, #00e5ff);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.6);
}

.btn-primary svg, .btn-success svg { width: 24px; height: 24px; flex-shrink: 0; }

.btn-icon { background: none; border: none; color: var(--text-muted); cursor: pointer; transition: color 0.3s; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; }
.btn-icon:hover { color: var(--text-main); }
.btn-icon svg { width: 20px; height: 20px; }
.btn-icon.absolute-right { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); }

.danger-hover:hover { color: var(--danger); }
.btn-danger { 
    background: rgba(239, 68, 68, 0.1); 
    color: var(--danger); 
    border: 1px solid rgba(239, 68, 68, 0.3); 
    border-radius: 0.5rem; 
    padding: 0.5rem; 
    min-width: 40px;
    cursor: pointer; 
    transition: all 0.3s; 
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-danger:hover { background: var(--danger); color: white; }
.btn-danger svg { width: 20px; height: 20px; }


.video-section {
    flex: 0 0 40dvh;
    background-color: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}
@media (min-width: 768px) {
    .video-section { flex: 1; height: 100%; border-bottom: none; border-right: 1px solid var(--border-color); }
}

.video-player { width: 100%; height: 100%; object-fit: contain; }


.prevent-interaction { pointer-events: none; }


video::-webkit-media-controls { display: none !important; }


.status-badge { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); padding: 0.4rem 0.8rem; border-radius: 0.25rem; font-size: 0.75rem; border: 1px solid rgba(255,255,255,0.1); position: absolute; z-index: 10; }
.status-badge.left-top { top: 1rem; left: 1rem; }

.floating-controls { display: flex; gap: 0.5rem; position: absolute; z-index: 20; opacity: 0; transition: opacity 0.3s; }
.floating-controls.right-top { top: 1rem !important; right: 1rem !important; bottom: auto !important; }
.video-section:hover .floating-controls { opacity: 1; }

.select-glass, .btn-glass {
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); border: 1px solid var(--border-color); color: white; border-radius: 0.25rem; padding: 0.4rem; font-size: 0.75rem; outline: none; cursor: pointer; transition: border-color 0.3s;
}
.select-glass:hover, .btn-glass:hover { border-color: var(--primary); }
.btn-glass svg { width: 18px; height: 18px; }


.sidebar-section {
    flex: 1;
    background-color: var(--bg-panel);
    display: flex;
    flex-direction: column;
    position: relative;
    max-height: 60dvh;
}
@media (min-width: 768px) {
    .sidebar-section { flex: none; width: 350px; max-height: 100dvh; }
}

.sidebar-header { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-color); background: rgba(30, 41, 59, 0.8); backdrop-filter: blur(10px); }
.header-actions { display: flex; gap: 1rem; }

.btn-badge { background: var(--bg-base); border: 1px solid var(--border-color); padding: 0.4rem 0.8rem; border-radius: 20px; font-size: 0.75rem; font-weight: bold; color: var(--primary); display: flex; align-items: center; gap: 0.5rem; cursor: pointer; transition: background 0.3s; }
.btn-badge:hover { background: var(--bg-panel-light); }
.ping-dot { width: 8px; height: 8px; background-color: var(--primary); border-radius: 50%; box-shadow: 0 0 8px var(--primary); animation: pulse 2s infinite; }

.chat-area { flex: 1; padding: 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.75rem; scroll-behavior: smooth; }


.chat-input-wrapper { padding: 0.75rem; border-top: 1px solid var(--border-color); background: var(--bg-panel); padding-bottom: max(0.75rem, env(safe-area-inset-bottom)); }
.chat-form { position: relative; display: flex; }
.input-chat-field { width: 100%; background: var(--bg-base); border: 1px solid var(--border-color); border-radius: 20px; padding: 0.6rem 2.5rem 0.6rem 1rem; color: var(--text-main); font-size: 0.85rem; outline: none; transition: border-color 0.3s; }
.input-chat-field:focus { border-color: var(--primary); }
.btn-send { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 32px; background: var(--primary); border: none; border-radius: 50%; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.3s; }
.btn-send:hover { background: var(--primary-hover); }
.btn-send svg { width: 16px; height: 16px; transform: rotate(90deg); }


.chat-msg { background: var(--bg-base); padding: 0.75rem; border-radius: 0.5rem; border: 1px solid var(--border-color); font-size: 0.85rem; word-break: break-word; }
.chat-msg-header { color: var(--primary); font-weight: bold; font-size: 0.75rem; display: block; margin-bottom: 0.25rem; }
.chat-msg-time { float: right; color: var(--text-muted); font-weight: normal; }
.chat-msg-sys { text-align: center; color: var(--text-muted); font-size: 0.75rem; font-style: italic; margin: 0.25rem 0; }


.modal-dropdown { position: absolute; top: 3.5rem; left: 1rem; background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: 0.5rem; padding: 0.75rem; width: 200px; box-shadow: var(--shadow-soft); z-index: 40; }
.dropdown-title { font-size: 0.7rem; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border-color); padding-bottom: 0.25rem; margin-bottom: 0.5rem; }
.dropdown-list { list-style: none; font-size: 0.85rem; display: flex; flex-direction: column; gap: 0.5rem; max-height: 230px; overflow-y: auto; padding-right: 5px; }
.dropdown-list li { display: flex; align-items: center; gap: 0.5rem; color: var(--text-main); }
.dot-online { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }


.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; transition: opacity 0.3s; }
.modal-box { background: var(--bg-panel); width: 100%; max-width: 500px; border-radius: 1rem; border: 1px solid var(--border-color); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); overflow: hidden; transform: scale(0.95); transition: transform 0.3s; }
.modal-overlay:not(.hidden) .modal-box { transform: scale(1); }

.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-color); background: rgba(15, 23, 42, 0.5); }
.modal-title { color: var(--primary); font-size: 1.1rem; display: flex; align-items: center; gap: 0.5rem; }
.modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; }

.section-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: bold; margin-bottom: 0.5rem; display: block; }
.input-group { display: flex; gap: 0.5rem; }
.select-field { flex: 1; cursor: pointer; }
.divider { border: 0; border-top: 1px solid var(--border-color); }


.overlay-carga { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(5px); display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 50; }
.loader-spinner { width: 40px; height: 40px; border: 3px solid var(--border-color); border-bottom-color: var(--primary); border-radius: 50%; display: inline-block; animation: rotation 1s linear infinite; margin-bottom: 1rem; }
.loader-text { color: var(--primary); font-size: 0.8rem; font-weight: bold; letter-spacing: 2px; animation: pulse 1.5s infinite; }

@keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }


.voice-controls { display: flex; gap: 0.5rem; align-items: center; }

#btn-mic, #btn-auriculares { 
    border: 1px solid var(--border-color); 
    border-radius: 50%; 
    width: 32px; height: 32px; 
    background: var(--bg-base); 
    transition: all 0.3s;
}


#btn-mic.btn-mic-off { color: var(--danger); }
#btn-mic.btn-mic-on { color: var(--success); box-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }
#btn-mic:disabled { opacity: 0.4; cursor: not-allowed; color: var(--text-muted); }


#btn-auriculares.btn-voice-on { color: var(--text-main); }
#btn-auriculares.btn-voice-off { color: var(--danger); opacity: 0.7; }

.modal-box.modal-large { 
    max-width: 850px; 
    max-height: 85dvh; 
    display: flex; 
    flex-direction: column; 
}
.modal-body { 
    overflow-y: auto;
}


.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.btn-icon-small {
    background: none; border: none; font-size: 1.2rem; cursor: pointer;
    transition: transform 0.3s;
}
.btn-icon-small:hover { transform: rotate(180deg); }

.netflix-grid {
    display: grid;
   
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.25rem;
    padding-bottom: 1rem;
}

.empty-catalog {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    font-style: italic;
}


.movie-card {
    background: var(--bg-base);
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}


.movie-card:hover {
    transform: translateY(-5px) scale(1.03);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    z-index: 2;
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    background-color: #111;
    background-size: cover;
    background-position: center;
    position: relative;
}


.movie-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}


.btn-play-movie {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px; height: 45px;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer;
    box-shadow: 0 0 15px var(--primary);
    transition: transform 0.2s;
}
.btn-play-movie:hover { transform: scale(1.15); }
.btn-play-movie svg { width: 22px; height: 22px; fill: white; margin-left: 3px; }


.movie-info {
    padding: 0.6rem;
    text-align: center;
    background: var(--bg-panel);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 1px solid var(--border-color);
}

.movie-title {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-year {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}