/* Variables de color */
:root {
    --bg-dark: #141414;       /* Fondo general más oscuro */
    --bg-panel: #1f1f1f;      /* Fondo de paneles laterales */
    --accent: #e50914;        /* Rojo estilo Netflix/YouTube */
    --text: #ffffff;
    --text-dim: #b3b3b3;
    --border: #333;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }

body {
    background-color: var(--bg-dark);
    color: var(--text);
    height: 100vh;
    display: grid;
    
    /* --- DEFINICIÓN DE LA GRILLA DE 3 COLUMNAS --- */
    /* 1. Info (250px) | 2. Video (Resto) | 3. Lista (300px) */
    grid-template-columns: 250px 1fr 300px; 
    
    grid-template-rows: 60px 1fr;
    grid-template-areas: 
        "header header header"
        "info   video  list";
}

/* --- Header --- */
header {
    grid-area: header;
    background-color: #000;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    z-index: 10;
}
header h1 { font-size: 1.2rem; color: var(--accent); font-weight: 800; letter-spacing: 1px; }

/* --- COLUMNA IZQUIERDA: Información del Canal --- */
.info-panel {
    grid-area: info;
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.channel-logo-placeholder {
    width: 100px;
    height: 100px;
    background-color: #333;
    border-radius: 50%;
    margin: 0 auto; /* Centrado */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #555;
    border: 2px solid var(--accent);
}

.info-details h2 { font-size: 1.5rem; margin-bottom: 10px; text-align: center; }
.info-details p { font-size: 0.9rem; color: var(--text-dim); line-height: 1.5; margin-bottom: 10px; }

.meta-tag {
    display: inline-block;
    background: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* --- COLUMNA CENTRAL: Reproductor --- */
main {
    grid-area: video;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 100%;
}

video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Asegura que el video se vea completo sin estirarse */
}

/* --- COLUMNA DERECHA: Lista y Filtros --- */
aside {
    grid-area: list;
    background-color: var(--bg-panel);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.filters-container {
    padding: 15px;
    background-color: #252525;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-group { display: flex; flex-direction: column; }
.filter-group label { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 4px; }

/* Inputs y Selects comunes */
select, input, textarea {
    background-color: #121212;
    border: 1px solid #444;
    color: white;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
}
select:focus, input:focus { border-color: var(--accent); }

/* Botones de acción */
.action-btn {
    background-color: var(--accent);
    color: white;
    border: 1px solid var(--accent);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.85rem;
}
.action-btn:hover { background-color: var(--accent); border-color: var(--accent); }
.btn-row { display: flex; justify-content: flex-end; gap: 10px; }

/* Tags de Categoría */
.category-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.cat-btn {
    background: #333; border: none; color: var(--text-dim);
    padding: 4px 10px; font-size: 0.75rem; border-radius: 12px;
    cursor: pointer; transition: 0.2s;
}
.cat-btn.active, .cat-btn:hover { background: var(--accent); color: white; }

/* Lista de canales scrollable */
.channel-list { flex: 1; overflow-y: auto; }
.channel-item {
    padding: 12px 15px;
    border-bottom: 1px solid #2a2a2a;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.channel-item:hover { background-color: #333; }
.channel-item.active { background-color: #333; border-right: 4px solid var(--accent); }

/* Responsive: En tablets/móviles se vuelve una sola columna vertical */
@media (max-width: 900px) {
    body {
        grid-template-columns: 1fr;
        grid-template-rows: 60px 300px auto 1fr; /* Header, Video, Info, Lista */
        grid-template-areas: 
            "header"
            "video"
            "info"
            "list";
    }
    .info-panel { border-right: none; border-bottom: 1px solid var(--border); height: auto; }
    aside { border-left: none; }
}