/* ===========================
   CSS Variables & Design Tokens
   =========================== */
:root {
    /* Dark theme (default) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.7);
    --bg-hover: rgba(99, 102, 241, 0.12);
    --bg-active: rgba(99, 102, 241, 0.2);
    --bg-glass: rgba(18, 18, 26, 0.85);

    --text-primary: #f0f0f5;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --accent: #7c3aed;
    --accent-hover: #9b66ff;
    --accent-glow: rgba(124, 58, 237, 0.4);
    --accent-gradient: linear-gradient(135deg, #7c3aed, #ec4899, #f43f5e);

    --danger: #ff4d4d;
    --success: #00e676;
    --warning: #ffab00;

    --border: rgba(255, 255, 255, 0.08);
    --border-active: rgba(124, 58, 237, 0.6);

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px var(--accent-glow);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --sidebar-width: 340px;
    --header-height: 60px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Light theme */
[data-theme="light"] {
    --bg-primary: #f5f5fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef0f5;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-hover: rgba(99, 102, 241, 0.08);
    --bg-active: rgba(99, 102, 241, 0.15);
    --bg-glass: rgba(255, 255, 255, 0.9);

    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;

    --border: rgba(0, 0, 0, 0.08);
    --border-active: rgba(99, 102, 241, 0.5);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* ===========================
   Reset & Base
   =========================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
    outline: none;
}

input {
    font-family: inherit;
    border: none;
    outline: none;
    background: none;
    color: inherit;
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* ===========================
   Loading Screen
   =========================== */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.loader-logo i {
    font-size: 40px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: 2;
    position: relative;
}

.pulse-ring {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: pulseRing 2s ease-out infinite;
    opacity: 0;
}

.pulse-ring.delay-1 {
    animation-delay: 0.5s;
}

.pulse-ring.delay-2 {
    animation-delay: 1s;
}

@keyframes pulseRing {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.loader-content h2 {
    font-size: 28px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.loader-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0 auto;
}

.loader-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    animation: loaderFill 2s ease forwards;
}

@keyframes loaderFill {
    0% {
        width: 0%;
    }

    50% {
        width: 60%;
    }

    100% {
        width: 100%;
    }
}

/* ===========================
   App Layout
   =========================== */
.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.app.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ===========================
   Header
   =========================== */
.header {
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 300;
    letter-spacing: -0.5px;
    user-select: none;
}

.logo i {
    font-size: 22px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo strong {
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    max-width: 400px;
    overflow: hidden;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    color: var(--danger);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
}

.live-badge i {
    font-size: 6px;
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.now-playing-text {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.channel-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    padding: 6px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
}

.channel-count i {
    color: var(--accent);
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

/* ===========================
   Main Content
   =========================== */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: calc(100vh - var(--header-height));
}

/* ===========================
   Sidebar
   =========================== */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: margin-left var(--transition-slow), width var(--transition-slow), min-width var(--transition-slow), opacity var(--transition-slow);
}

.sidebar.collapsed {
    margin-left: calc(var(--sidebar-width) * -1);
    min-width: 0;
    width: 0;
    opacity: 0;
}

/* Search */
.search-wrapper {
    padding: 16px;
    flex-shrink: 0;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    height: 42px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition-fast);
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box i {
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    height: 100%;
    font-size: 13px;
    color: var(--text-primary);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.clear-search {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-muted);
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.clear-search:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.clear-search.hidden {
    display: none;
}

/* Categories */
.categories-wrapper {
    padding: 0 16px 12px;
    flex-shrink: 0;
}

.categories {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    flex-wrap: wrap;
}

.categories::-webkit-scrollbar {
    display: none;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    white-space: nowrap;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.category-btn i {
    font-size: 10px;
}

.category-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-active);
}

.category-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
    flex-shrink: 0;
}

.section-header h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header h3 i {
    font-size: 11px;
    color: var(--accent);
}

.fav-count,
.channel-filter-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Favorites Section */
.favorites-section {
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
    max-height: 200px;
}

.favorites-section .channel-list {
    max-height: 150px;
    overflow-y: auto;
}

/* Channels Section */
.channels-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* Channel List */
.channel-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 8px;
}

.channel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    margin-bottom: 2px;
}

.channel-item:hover {
    background: var(--bg-hover);
}

.channel-item.active {
    background: var(--bg-active);
    border-left: 3px solid var(--accent);
}

.channel-item.active .channel-name {
    color: var(--accent-hover);
    font-weight: 600;
}

.channel-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}

.channel-icon.sports {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.channel-icon.news {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.channel-icon.entertainment {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.channel-icon.movies {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.channel-icon.kids {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.channel-icon.music {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.channel-icon.bangla {
    background: linear-gradient(135deg, #006a4e, #004d3b);
}

.channel-icon.discovery {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.channel-icon.hindi {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.channel-info {
    flex: 1;
    min-width: 0;
}

.channel-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.channel-meta .hd-badge {
    font-size: 9px;
    font-weight: 700;
    background: var(--accent);
    color: #fff;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.channel-fav-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-muted);
    transition: var(--transition-fast);
    flex-shrink: 0;
    opacity: 0;
}

.channel-item:hover .channel-fav-btn {
    opacity: 1;
}

.channel-fav-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.channel-fav-btn.fav {
    opacity: 1;
    color: var(--danger);
}

/* No results */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.no-results i {
    font-size: 36px;
    color: var(--text-muted);
    margin-bottom: 12px;
    opacity: 0.5;
}

.no-results h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.no-results p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===========================
   Player Area
   =========================== */
.player-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #000;
    min-width: 0;
}

/* Video Container */
.video-container {
    flex: 1;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Player Idle */
.player-idle {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, var(--bg-tertiary) 0%, var(--bg-primary) 80%);
    z-index: 10;
}

.player-idle.hidden {
    display: none;
}

.idle-content {
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.idle-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: var(--shadow-glow);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.idle-icon i {
    font-size: 40px;
    color: #fff;
}

.idle-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.idle-content p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.idle-features {
    display: flex;
    gap: 32px;
    justify-content: center;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.feature i {
    font-size: 20px;
    color: var(--accent);
}

.feature span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Player Loading */
.player-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 15;
}

.player-loading.hidden {
    display: none;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.player-loading p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* Player Error */
.player-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    z-index: 15;
    text-align: center;
}

.player-error.hidden {
    display: none;
}

.player-error i {
    font-size: 48px;
    color: var(--warning);
    margin-bottom: 16px;
}

.player-error h3 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 8px;
}

.player-error p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
}

.retry-btn {
    padding: 10px 24px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.retry-btn:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

/* Player Controls */
.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.video-container:hover .player-controls,
.player-controls.show {
    opacity: 1;
}

.controls-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    pointer-events: none;
}

.controls-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.controls-left,
.controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    transition: var(--transition-fast);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 4px;
}

.volume-slider-wrapper {
    width: 0;
    overflow: hidden;
    transition: width var(--transition-normal);
}

.volume-control:hover .volume-slider-wrapper {
    width: 90px;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 6px var(--accent-glow);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

.control-channel-name {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 8px;
}

/* Channel Info Bar */
.channel-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.info-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.channel-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
}

.channel-details h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.channel-category-badge {
    font-size: 11px;
    font-weight: 500;
    color: var(--accent);
    text-transform: capitalize;
}

.info-bar-right {
    display: flex;
    gap: 8px;
}

.info-action-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
}

.info-action-btn:hover {
    background: var(--bg-hover);
    color: var(--accent);
    border-color: var(--border-active);
}

.info-action-btn.fav {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 300px;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
        --header-height: 54px;
    }

    .header-center {
        display: none;
    }

    .channel-count {
        display: none;
    }

    .sidebar {
        position: fixed;
        top: var(--header-height);
        left: 0;
        bottom: 0;
        z-index: 1000;
        width: 100%;
        max-width: 100%;
        background: var(--bg-secondary);
        transition: transform var(--transition-slow), opacity var(--transition-slow);
    }

    .sidebar.collapsed {
        margin-left: 0;
        width: 100%;
        min-width: 100%;
        opacity: 0;
        transform: translateX(-100%);
        pointer-events: none;
    }

    .idle-features {
        gap: 20px;
    }

    .idle-content h2 {
        font-size: 22px;
    }

    .idle-content p {
        font-size: 13px;
    }

    .idle-icon {
        width: 80px;
        height: 80px;
    }

    .idle-icon i {
        font-size: 32px;
    }

    .channel-info-bar {
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .logo span {
        display: none;
    }

    .player-controls .controls-row {
        padding: 12px 10px;
    }

    .control-channel-name {
        display: none;
    }
}

/* ===========================
   Animations & Utils
   =========================== */
.fade-enter {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(-10px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Keyboard focus styles */
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}