/* ============================================================
 *  Bwhos Player - Modern Dark Theme
 *  Palette inspired by Mux & streaming UI best practices
 * ============================================================ */

:root {
    --bg-base: #121212;        /* Main background */
    --bg-card: #1C1C1C;        /* Cards, panels, sidebar */
    --bg-elevated: #252525;    /* Dropdowns, hover states */
    --brand: #FA50B5;          /* Primary accent (pink) */
    --brand-hover: #D4368D;    /* Hover state for brand */
    --text-primary: #F5F5F5;   /* Headings, main text */
    --text-secondary: #A0A0A0; /* Labels, secondary info */
    --border: #333333;         /* Default borders */
    --player-bg: #000000;      /* Video player background */
}

* { box-sizing: border-box; }

body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.container-fluid { padding: 15px; }

/* ===== PLAYER COLUMN ===== */
.player-column { padding: 10px; }

.player-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border);
}

.player-header h4 {
    color: var(--brand);
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.video-wrapper {
    position: relative;
    width: 100%;
    background: var(--player-bg);
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    display: block;
    background: var(--player-bg);
}

#player-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--player-bg);
    color: #555;
    pointer-events: none;
}

#player-placeholder i { font-size: 4rem; margin-bottom: 10px; }
#player-placeholder p { font-size: 1rem; margin: 0; }

.manual-input { margin-top: 15px; }

.manual-input input {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.manual-input input::placeholder { color: var(--text-secondary); }

.manual-input .btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #000;
    font-weight: 600;
}

.manual-input .btn-primary:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
    color: #fff;
}

/* ===== SIDEBAR ===== */
.sidebar-column { padding: 10px; }

.sidebar {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border);
    height: calc(100vh - 50px);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sidebar-header h4 {
    color: var(--brand);
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.sidebar-header .badge {
    background: var(--brand) !important;
    color: #000 !important;
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.filter-section { margin-bottom: 10px; }

.filter-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.filter-box {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-height: 80px;
    overflow-y: auto;
    padding-right: 3px;
}

.filter-box::-webkit-scrollbar { width: 4px; }
.filter-box::-webkit-scrollbar-track { background: var(--bg-elevated); }
.filter-box::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 2px; }

.filter-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.filter-btn.active {
    background: var(--brand);
    color: #000;
    border-color: var(--brand);
    font-weight: bold;
}

.search-box {
    position: relative;
    margin-bottom: 10px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    outline: none;
}

.search-box input:focus { border-color: var(--brand); }
.search-box input::placeholder { color: var(--text-secondary); }

/* ===== CHANNEL LIST ===== */
.channel-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.channel-list::-webkit-scrollbar { width: 6px; }
.channel-list::-webkit-scrollbar-track { background: var(--bg-elevated); border-radius: 3px; }
.channel-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.channel-list::-webkit-scrollbar-thumb:hover { background: var(--brand); }

.channel-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 5px;
    border: 1px solid transparent;
}

.channel-item:hover {
    background: var(--bg-elevated);
    border-color: var(--border);
}

.channel-item.active {
    background: var(--bg-elevated);
    border-color: var(--brand);
}

.channel-logo {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--border);
}

.channel-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.channel-logo span {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--brand);
}

.channel-info { flex: 1; min-width: 0; }

.channel-info .name {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-info .meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.channel-info .meta .flag { margin-left: 8px; }

.no-result {
    text-align: center;
    color: var(--text-secondary);
    padding: 30px 10px;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .sidebar {
        height: auto;
        max-height: 500px;
        margin-top: 15px;
    }
}

@media (max-width: 576px) {
    .container-fluid { padding: 5px; }
    .player-container, .sidebar { padding: 10px; border-radius: 8px; }
}