/* =========================================
   DNC RADIO - HOJA DE ESTILOS UNIVERSAL
   ========================================= */
:root {
    --bg-color: #0d0d0d;
    --panel-bg: #141414;
    --dnc-red: #cc0000;
    --dnc-red-hover: #ff1a1a;
    --text-light: #f5f5f5;
    --text-muted: #666;
    --player-height: 95px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Arial, sans-serif; }
body { background-color: var(--bg-color); color: var(--text-light); display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* HEADER UNIVERSAL */
header { background-color: #000; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--dnc-red); }
/* --- ESTILOS DEL LOGOTIPO DNC --- */
/* --- ESTILOS DEL LOGOTIPO DNC --- */
.logo-area {
    display: flex;
    align-items: center;
    flex: 0 0 auto; /* Instrucción crítica: Prohíbe que el contenedor se encoja */
}

.header-logo {
    height: 55px; /* Altura estricta, no usamos max-height */
    width: 220px; /* Ancho estimado forzado para abrir el espacio físico */
    object-fit: contain; /* Encaja el SVG perfectamente sin deformarlo */
    object-position: left center; /* Alinea el logo a la izquierda */
    display: block;
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.03); 
}

/* Ajuste móvil para pantallas muy estrechas */
@media (max-width: 400px) {
    .header-logo {
        height: 35px;
        width: 160px;
    }
}
.user-info { font-size: 14px; display: flex; align-items: center; gap: 12px; }
.btn-logout { background: #222; color: #aaa; border: 1px solid #333; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 11px; font-weight: bold; transition: 0.3s; }
.btn-logout:hover { background: var(--dnc-red); color: white; border-color: var(--dnc-red); }
.badge-locutor { background: var(--dnc-red); color: white; padding: 3px 6px; border-radius: 3px; font-size: 10px; font-weight: bold; }
.btn-volver { background: #333; color: white; text-decoration: none; padding: 8px 15px; border-radius: 4px; font-size: 13px; }

/* CONTENEDOR PRINCIPAL RADIO */
.app-container { display: flex; flex: 1; height: 100%; padding-bottom: var(--player-height); overflow: hidden; box-sizing: border-box; }
.studio-panel { flex: 1; padding: 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; background: radial-gradient(circle at center, #1a1a1a 0%, #070707 100%); position: relative; }
.live-indicator { background-color: var(--dnc-red); color: white; padding: 5px 15px; border-radius: 20px; font-weight: bold; animation: pulse 2s infinite; margin-bottom: 20px; font-size: 12px; letter-spacing: 1px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(204, 0, 0, 0.7); } 70% { box-shadow: 0 0 0 12px rgba(204, 0, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(204, 0, 0, 0); } }
.track-metadata { text-align: center; margin-top: 15px; background: rgba(255,255,255,0.03); padding: 20px; border-radius: 8px; border: 1px solid #222; min-width: 300px; }
.show-title { font-size: 2.5rem; font-weight: 800; color: #fff; margin-bottom: 5px; }
.now-playing { font-size: 1.2rem; color: var(--dnc-red); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* CHAT PANEL */
.chat-panel { width: 420px; background-color: var(--panel-bg); border-left: 1px solid #222; display: flex; flex-direction: column; position: relative; min-height: 200px; }
.login-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #111111; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; box-sizing: border-box; }
.login-box-inside { background: #181818; border: 1px solid #282828; padding: 25px; border-radius: 8px; width: 100%; max-width: 360px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.login-overlay h3 { margin-bottom: 15px; font-size: 1.3rem; color: white; font-weight: 700; }
.login-input { width: 100%; background: #0a0a0a; border: 1px solid #333; color: white; padding: 12px; border-radius: 4px; margin-bottom: 15px; outline: none; font-size: 14px; text-align: center; }
.login-input:focus { border-color: var(--dnc-red); }
.btn-login { background: var(--dnc-red); color: white; border: none; padding: 12px 25px; border-radius: 4px; font-weight: bold; cursor: pointer; width: 100%; transition: 0.3s; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.btn-login:hover { background: var(--dnc-red-hover); }

/* PESTAÑAS Y MENSAJES */
.chat-tabs { display: flex; background: #0a0a0a; border-bottom: 1px solid #222; }
.tab { flex: 1; padding: 12px; text-align: center; font-size: 13px; font-weight: bold; cursor: pointer; color: #555; transition: 0.2s; border-bottom: 2px solid transparent; }
.tab.active { color: var(--dnc-red); border-bottom-color: var(--dnc-red); background: var(--panel-bg); }
.tab:hover:not(.active) { color: #aaa; }
.chat-messages { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.msg { background: #1b1b1b; padding: 10px; border-radius: 6px; font-size: 13px; }
.msg-header { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 3px; }
.msg-author { font-weight: bold; color: #ddd; }
.msg-time { color: #444; }
.msg.official { border-left: 3px solid var(--dnc-red); background: #1c1111; }
.msg.official .msg-author { color: var(--dnc-red); }

/* CHATS PRIVADOS Y RADAR */
.msg-me { background: #2a0a0a; border-right: 3px solid var(--dnc-red); text-align: right; margin-left: 15%; border-radius: 6px 0 6px 6px; }
.msg-them { background: #1b1b1b; border-left: 3px solid #555; text-align: left; margin-right: 15%; border-radius: 0 6px 6px 6px; }
.user-card { background: #1a1a1a; padding: 12px 15px; border-radius: 6px; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: 0.2s; border: 1px solid #222; }
.user-card:hover { background: #222; border-color: var(--dnc-red); }
.private-header { text-align:center; padding: 10px; background:#111; border-bottom:1px solid #222; margin:-15px -15px 15px -15px; font-weight:bold; color:var(--dnc-red); position:sticky; top:-15px; z-index:10; }
.btn-back-chat { background:none; border:none; color:#aaa; float:right; cursor:pointer; font-size: 12px; margin-top:2px; }
.btn-back-chat:hover { color: white; }

/* INPUT ÁREA */
.chat-input-area { padding: 12px; background-color: #0a0a0a; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid #222; }
.input-row { display: flex; gap: 8px; }
.chat-input-area input { flex: 1; background: #1a1a1a; border: 1px solid #333; color: white; padding: 10px; border-radius: 4px; outline: none; font-size: 13px; }
.btn-send { background: var(--dnc-red); color: white; border: none; padding: 0 15px; border-radius: 4px; cursor: pointer; transition: 0.2s; }
.btn-send:hover { background: var(--dnc-red-hover); }

/* REPRODUCTOR */
.player-bar { height: var(--player-height); background-color: #050505; border-top: 1px solid #222; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; position: fixed; bottom: 0; width: 100%; z-index: 1000; }
.player-controls { display: flex; align-items: center; gap: 20px; }
.play-btn { background: var(--dnc-red); color: white; width: 48px; height: 48px; border-radius: 50%; border: none; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.volume-slider { width: 95px; cursor: pointer; accent-color: var(--dnc-red); }

/* TABLA MODERACIÓN */
.table-container { background: #161616; border: 1px solid #222; border-radius: 8px; overflow: hidden; margin: 20px; flex: 1; overflow-y: auto;}
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 12px 15px; border-bottom: 1px solid #222; font-size: 13.5px; }
th { background: #1a1a1a; color: #888; font-weight: 600; text-transform: uppercase; font-size: 12px; position: sticky; top: 0; z-index: 5; }
tr:hover { background: #1e1e1e; }
.btn-action { border: none; padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; color: white; margin-right: 5px; }
.btn-del { background: #ff4444; } .btn-ban { background: #f39c12; }

/* OPTIMIZACIÓN MÓVIL Y RESPONSIVA */
/* OPTIMIZACIÓN MÓVIL Y RESPONSIVA (Mobile-First Fix) */
@media (max-width: 768px) {
    body, html {
        overflow-y: auto !important; /* Liberamos el scroll nativo del celular */
        height: auto !important;
    }
    header { padding: 10px 15px; }
    .logo-area h1 { font-size: 18px; }
    .user-info { font-size: 12px; }
    
    .app-container {
        flex-direction: column;
        height: auto !important;
        overflow: visible !important;
        padding-bottom: calc(var(--player-height) + 20px) !important;
    }
    
    .studio-panel {
        flex: none;
        padding: 15px 10px;
        min-height: auto;
    }
    
    .live-indicator { margin-bottom: 5px; padding: 3px 10px; font-size: 10px; }
    .track-metadata { min-width: 100%; padding: 10px; margin-top: 5px; }
    .show-title { font-size: 1.5rem; margin-bottom: 2px; }
    .now-playing { font-size: 1rem; }
    
    .chat-panel {
        width: 100%;
        flex: none;
        height: 550px !important; /* Altura firme garantizada para el login y el chat */
        min-height: 550px !important;
        border-left: none;
        border-top: 2px solid #333;
        position: relative; /* Clave para anclar la máscara de login */
    }
    
    .msg-me { margin-left: 5%; }
    .msg-them { margin-right: 5%; }
    
    .player-bar { padding: 0 10px; gap: 10px; }
    .player-controls { gap: 10px; }
    .volume-slider { width: 70px; }
    .table-container { margin: 10px; }
    
    /* Ajuste de tarjeta de locutor dinámica para móvil */
    .program-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        gap: 15px;
        margin-bottom: 10px;
    }
    .prog-info { text-align: center; }
}
/* =========================================
   TARJETA DINÁMICA DEL LOCUTOR / PROGRAMA
   ========================================= */
.program-card {
    background: rgba(15, 15, 15, 0.85);
    border: 1px solid #222;
    border-left: 4px solid var(--dnc-red);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    transition: all 0.4s ease;
}

.prog-logo {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #333;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.prog-info {
    text-align: left;
    flex: 1;
}

.prog-title {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.prog-locutor {
    color: var(--dnc-red);
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.prog-desc {
    color: #aaa;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

.prog-time {
    display: inline-block;
    background: #0a0a0a;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #777;
    border: 1px solid #222;
    font-weight: bold;
}

/* Optimización móvil para la tarjeta del locutor */
@media(max-width: 768px) {
    .program-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        gap: 15px;
    }
    .prog-info {
        text-align: center;
    }
}