* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: #0a0c0e;
    color: #fff;
    overflow-x: hidden;
}

/* ===== HEADER SIMPLE ===== */
header {
    background: #0f1214;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e50914;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: #e50914;
    font-size: 20px;
}

.logo h1 {
    font-size: 18px;
    font-weight: 600;
}

.logo span {
    font-size: 12px;
    color: #888;
    margin-left: 8px;
    font-weight: normal;
}

.header-btns {
    display: flex;
    gap: 8px;
}

.btn {
    background: #1e1e1e;
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.btn:hover {
    background: #2a2a2a;
}

.btn i {
    font-size: 13px;
}

.btn.active {
    background: #e50914;
}

/* ===== LAYOUT PRINCIPAL ===== */
.container {
    display: flex;
    height: calc(100vh - 58px);
    position: relative;
}

/* ===== BARRA LATERAL (CANALES) ===== */
.sidebar {
    width: 300px;
    background: #0f1214;
    border-right: 1px solid #1e1e1e;
    display: flex;
    flex-direction: column;
    transition: 0.3s;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #1e1e1e;
}

.search-box {
    position: relative;
    margin-bottom: 12px;
}

.search-box i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 13px;
}

.search-box input {
    width: 100%;
    padding: 8px 8px 8px 32px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
}

.search-box input:focus {
    outline: none;
    border-color: #e50914;
}

.filters {
    display: flex;
    gap: 8px;
}

.filters select {
    flex: 1;
    padding: 6px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
}

.channels-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.channel-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
    margin-bottom: 2px;
    position: relative;
}

.channel-item:hover {
    background: #1a1a1a;
}

.channel-item.active {
    background: #1e1e1e;
    border-left: 3px solid #e50914;
}

.channel-logo {
    width: 32px;
    height: 32px;
    background: #2a2a2a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: bold;
    color: #e50914;
}

.channel-info {
    flex: 1;
}

.channel-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.channel-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: #888;
}

.channel-badge {
    background: #2a2a2a;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
}

/* ===== ÁREA PRINCIPAL ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0a0c0e;
}

.player-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.player-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.player-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0f1214;
    color: #666;
}

.player-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #333;
}

.channel-details {
    margin-top: 16px;
    padding: 12px;
    background: #0f1214;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.details-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.details-logo {
    width: 40px;
    height: 40px;
    background: #1a1a1a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e50914;
    font-weight: bold;
}

.details-name {
    font-size: 16px;
    font-weight: 600;
}

.details-option {
    font-size: 13px;
    color: #888;
}

/* ===== OPCIONES DE STREAMING ===== */
.options-section {
    margin-top: 20px;
}

.options-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.option-btn {
    padding: 10px;
    background: #0f1214;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: 0.2s;
}

.option-btn:hover {
    background: #1a1a1a;
    border-color: #e50914;
}

.option-btn.active {
    background: #1e1e1e;
    border-color: #e50914;
}

/* ===== CHAT ===== */
.chat-section {
    width: 300px;
    background: #0f1214;
    border-left: 1px solid #1e1e1e;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 16px;
    border-bottom: 1px solid #1e1e1e;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: #000;
}

/* ===== UTILIDADES ===== */
.hidden {
    display: none !important;
}

.mobile-menu {
    display: none;
}

/* ===== SCROLL ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0f1214;
}

::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a3a;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
    }
    .chat-section {
        width: 260px;
    }
}

@media (max-width: 768px) {
    header {
        position: relative;
    }
    
    .header-btns {
        display: none;
    }
    
    .mobile-menu {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #0f1214;
        border-top: 1px solid #1e1e1e;
        padding: 8px;
        gap: 8px;
        z-index: 1000;
    }
    
    .mobile-menu .btn {
        flex: 1;
        justify-content: center;
    }
    
    .container {
        height: calc(100vh - 110px);
        margin-bottom: 50px;
    }
    
    .sidebar, .chat-section {
        position: fixed;
        top: 58px;
        left: 0;
        right: 0;
        bottom: 58px;
        width: 100%;
        display: none;
        z-index: 90;
    }
    
    .sidebar.active, .chat-section.active {
        display: flex;
    }
    
    .main-content {
        width: 100%;
    }
    
    .player-section {
        padding: 12px;
    }
}
/* ===== MODO SOLO REPRODUCTOR ===== */
.player-only-mode .sidebar,
.player-only-mode .chat-section,
.player-only-mode header .header-btns button:not(#playerOnlyBtn),
.player-only-mode .mobile-menu,
.player-only-mode header .logo span,
.player-only-mode #channelDetails,
.player-only-mode .options-section {
    display: none !important;
}

.player-only-mode .main-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.player-only-mode .player-section {
    height: 100vh !important;
    width: 100vw !important;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    background: black;
}

.player-only-mode .player-container {
    height: 100% !important;
    width: 100% !important;
}

.player-only-mode #mainPlayer {
    height: 100% !important;
    width: 100% !important;
    display: block !important;
}

.player-only-mode .player-placeholder {
    display: none !important;
}

.player-only-mode header {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #333;
    width: auto;
}

.player-only-mode .logo h1 {
    font-size: 16px;
    margin: 0;
}

.player-only-mode .header-btns {
    margin: 0;
    display: flex;
    gap: 5px;
}

#playerOnlyBtn {
    background: #4CAF50;
    color: white;
}

.player-only-mode #playerOnlyBtn {
    background: #f44336;
}

/* Botón de salir flotante */
.exit-player-only {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    gap: 8px;
}

.player-only-mode .exit-player-only {
    display: flex;
}

.exit-player-only:hover {
    background: #d32f2f;
}

.exit-player-only i {
    font-size: 16px;
}