@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* Remix Icons spin utility */
@keyframes ri-spin-anim {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.ri-spin {
    animation: ri-spin-anim 0.8s linear infinite;
    display: inline-block;
}


/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --primary: hsl(230, 90%, 62%);
    --primary-glow: hsla(230, 90%, 62%, 0.45);
    --secondary: hsl(270, 85%, 65%);
    --secondary-glow: hsla(270, 85%, 65%, 0.35);
    --accent: hsl(185, 95%, 50%);
    --accent-glow: hsla(185, 95%, 50%, 0.35);
    --danger: hsl(0, 90%, 60%);

    --bg-base: hsl(222, 50%, 7%);
    --bg-surface: hsla(222, 50%, 12%, 0.75);
    --bg-elevated: hsla(222, 50%, 16%, 0.6);

    --glass: hsla(0, 0%, 100%, 0.04);
    --glass-hover: hsla(0, 0%, 100%, 0.08);
    --glass-border: hsla(0, 0%, 100%, 0.1);
    --glass-border-bright: hsla(0, 0%, 100%, 0.2);

    --text-primary: hsl(210, 40%, 98%);
    --text-secondary: hsl(215, 20%, 60%);
    --text-muted: hsl(215, 15%, 40%);

    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px var(--primary-glow);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Animated background orbs */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    animation: orb-drift 18s ease-in-out infinite alternate;
}

body::before {
    width: 700px;
    height: 700px;
    top: -200px;
    left: -200px;
    background: radial-gradient(circle, hsla(230, 90%, 55%, 0.18) 0%, transparent 70%);
}

body::after {
    width: 600px;
    height: 600px;
    bottom: -150px;
    right: -150px;
    background: radial-gradient(circle, hsla(270, 85%, 60%, 0.15) 0%, transparent 70%);
    animation-delay: -9s;
}

@keyframes orb-drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(40px, 30px) scale(1.08);
    }

    100% {
        transform: translate(-20px, 50px) scale(0.95);
    }
}

/* ============================================================
   SCROLLBARS
   ============================================================ */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ============================================================
   AUTH / LOGIN PAGE
   ============================================================ */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    overflow: auto;
    position: relative;
    z-index: 1;
}

/* Floating particles on login */
.auth-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 20% 30%, hsla(230, 90%, 70%, 0.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 20%, hsla(270, 85%, 70%, 0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 80%, hsla(185, 95%, 60%, 0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 40% 60%, hsla(230, 90%, 70%, 0.4) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    background: var(--bg-surface);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow:
        var(--shadow-lg),
        0 0 0 1px var(--glass-border),
        inset 0 1px 0 var(--glass-border-bright);
    animation: card-appear 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes card-appear {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Glow ring on the card */
.auth-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--primary-glow), transparent 50%, var(--secondary-glow));
    z-index: -1;
    opacity: 0.6;
    filter: blur(1px);
}

.brand-section {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 8px 32px var(--primary-glow), 0 0 0 1px var(--glass-border-bright);
    margin-bottom: 1.25rem;
    font-size: 2rem;
    animation: icon-pulse 3s ease-in-out infinite;
}

@keyframes icon-pulse {

    0%,
    100% {
        box-shadow: 0 8px 32px var(--primary-glow), 0 0 0 1px var(--glass-border-bright);
    }

    50% {
        box-shadow: 0 8px 48px var(--primary-glow), 0 0 0 1px var(--glass-border-bright), 0 0 60px var(--secondary-glow);
    }
}

.brand-title {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.brand-subtitle {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Error alert */
.alert-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: hsla(0, 90%, 50%, 0.1);
    border: 1px solid hsla(0, 90%, 50%, 0.25);
    color: #ff7b7b;
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.75rem;
    font-size: 0.88rem;
    animation: shake 0.4s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

/* Form inputs */
.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.input-group label i {
    color: var(--primary);
    font-size: 0.8rem;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    width: 100%;
    padding: 0.9rem 1.25rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
    outline: none;
}

.input-wrap input::placeholder {
    color: var(--text-muted);
}

.input-wrap input:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px var(--primary-glow), 0 0 20px var(--primary-glow);
}

/* Legacy class support */
.input-container {
    margin-bottom: 1.25rem;
}

.input-container label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.input-container input {
    width: 100%;
    padding: 0.9rem 1.25rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.input-container input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-premium {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
    box-shadow: 0 4px 24px var(--primary-glow);
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px var(--primary-glow), 0 0 60px var(--secondary-glow);
}

.btn-premium:hover::before {
    left: 100%;
}

.btn-premium:active {
    transform: translateY(0);
}

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dashboard-container {
    display: grid;
    grid-template-columns: 290px 1fr 460px;
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: 1;
}

/* ============================================================
   SIDEBAR — CATEGORIES
   ============================================================ */
.sidebar-categories {
    background: hsla(222, 50%, 5%, 0.7);
    border-right: 1px solid var(--glass-border);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.sidebar-categories::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.sidebar-header {
    padding: 1.75rem 1.5rem 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    background: hsla(185, 95%, 50%, 0.12);
    border: 1px solid hsla(185, 95%, 50%, 0.25);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    margin-top: 0.3rem;
}

/* Category search */
.cat-search-wrap {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.cat-search-inner {
    position: relative;
}

.cat-search-inner i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
    pointer-events: none;
    transition: var(--transition-fast);
}

.cat-search-input {
    width: 100%;
    padding: 0.6rem 0.75rem 0.6rem 2.2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: var(--transition);
}

.cat-search-input::placeholder {
    color: var(--text-muted);
}

.cat-search-input:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.45);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.cat-search-input:focus+i,
.cat-search-inner:focus-within i {
    color: var(--primary);
}

.category-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    min-height: 0;
}

.cat-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem 0.25rem;
    margin-bottom: 0.25rem;
}

.cat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.2rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 500;
    font-size: 0.88rem;
    position: relative;
    border: 1px solid transparent;
}

.cat-item .cat-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--glass);
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.cat-item:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
    border-color: var(--glass-border);
}

.cat-item:hover .cat-icon {
    background: hsla(230, 90%, 62%, 0.15);
    color: var(--primary);
}

.cat-item.active {
    background: linear-gradient(135deg,
            hsla(230, 90%, 62%, 0.18),
            hsla(270, 85%, 65%, 0.12));
    color: var(--text-primary);
    font-weight: 600;
    border-color: hsla(230, 90%, 62%, 0.35);
    box-shadow: 0 0 20px hsla(230, 90%, 62%, 0.1);
}

.cat-item.active .cat-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.cat-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 8px var(--primary-glow);
}

.cat-count {
    margin-left: auto;
    font-size: 0.7rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 0.1rem 0.45rem;
    border-radius: 20px;
    color: var(--text-muted);
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition-fast);
    cursor: pointer;
}

.logout-btn:hover {
    background: hsla(0, 90%, 50%, 0.1);
    border-color: hsla(0, 90%, 50%, 0.3);
    color: #ff7b7b;
}

/* ============================================================
   MAIN — CHANNELS
   ============================================================ */
.main-channels {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: hsla(222, 50%, 9%, 0.4);
    position: relative;
}

.channel-header {
    padding: 1.25rem 1.75rem;
    background: hsla(222, 50%, 6%, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 10;
    flex-shrink: 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.category-title {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 0.4rem 0.9rem;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 500;
}

.user-dot {
    width: 8px;
    height: 8px;
    background: #10d98a;
    border-radius: 50%;
    box-shadow: 0 0 10px #10d98a, 0 0 20px rgba(16, 217, 138, 0.4);
    animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {

    0%,
    100% {
        box-shadow: 0 0 8px #10d98a;
    }

    50% {
        box-shadow: 0 0 16px #10d98a, 0 0 32px rgba(16, 217, 138, 0.5);
    }
}

/* Channel search */
.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-fast);
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.75rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: var(--transition);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 0 0 3px var(--primary-glow), 0 0 30px var(--primary-glow);
}

.search-input:focus~.search-icon {
    color: var(--primary);
}

/* Channel grid */
.channel-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    min-height: 0;
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
}

.channel-card-premium {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.channel-card-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
    opacity: 0;
    transition: var(--transition);
    border-radius: inherit;
}

.channel-card-premium:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: hsla(230, 90%, 62%, 0.5);
    box-shadow:
        var(--shadow-md),
        0 0 30px var(--primary-glow),
        inset 0 1px 0 var(--glass-border-bright);
}

.channel-card-premium:hover::before {
    opacity: 0.06;
}

.channel-card-premium:active {
    transform: translateY(-2px) scale(1);
}

.card-img-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 0.9rem;
}

.card-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.channel-card-premium:hover .card-img {
    box-shadow: 0 0 20px var(--primary-glow);
    border-color: var(--primary);
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    border-radius: var(--radius-sm);
    opacity: 0;
    transition: var(--transition-fast);
    color: #fff;
    font-size: 1.4rem;
}

.channel-card-premium:hover .play-overlay {
    opacity: 1;
}

.card-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Empty / loading states */
.state-message {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    gap: 1rem;
}

.state-message i {
    font-size: 2.5rem;
    color: var(--text-muted);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   PLAYER SIDEBAR
   ============================================================ */
.player-sidebar {
    background: hsla(222, 50%, 4%, 0.85);
    border-left: 1px solid var(--glass-border);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

.player-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary), var(--secondary));
}

.player-header {
    padding: 1.5rem 1.75rem 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.player-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.player-header h2 i {
    color: var(--accent);
    font-size: 1rem;
}

.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.video-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--glass-border);
    pointer-events: none;
}

video {
    width: 100%;
    height: 100%;
    display: block;
}

.playback-error {
    display: none;
    margin: 1rem 1.5rem;
    padding: 0.9rem 1.25rem;
    background: hsla(0, 90%, 50%, 0.1);
    border: 1px solid hsla(0, 90%, 50%, 0.25);
    color: #ff7b7b;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    display: none;
    align-items: center;
    gap: 0.6rem;
}

.now-playing {
    padding: 1.5rem 1.75rem;
    flex: 1;
}

.now-playing-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.now-playing h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.now-playing p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.controls-panel {
    margin-top: 1.5rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.controls-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.controls-row {
    display: flex;
    gap: 0.75rem;
}

.ctrl-btn {
    flex: 1;
    padding: 0.7rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.ctrl-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    box-shadow: 0 4px 20px var(--primary-glow);
    transform: translateY(-1px);
}

.player-footer {
    padding: 1.25rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1280px) {
    .dashboard-container {
        grid-template-columns: 260px 1fr 0;
    }

    .player-sidebar {
        position: fixed;
        right: -480px;
        top: 0;
        height: 100%;
        width: 420px;
        z-index: 200;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
    }

    .player-sidebar.active {
        right: 0;
    }

    .player-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 199;
        backdrop-filter: blur(4px);
    }

    .player-overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 0 1fr 0;
    }

    .sidebar-categories {
        position: fixed;
        left: -300px;
        top: 0;
        height: 100%;
        width: 280px;
        z-index: 200;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar-categories.active {
        left: 0;
    }

    .channel-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}

/* ============================================================
   SIDEBAR FOOTER — ACTION BUTTONS
   ============================================================ */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.sidebar-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.65rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: var(--transition-fast);
}

.sidebar-action-btn:hover {
    background: hsla(230, 90%, 62%, 0.12);
    border-color: hsla(230, 90%, 62%, 0.35);
    color: var(--primary);
}

/* ============================================================
   HEADER RIGHT
   ============================================================ */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Make user-badge a button */
.user-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 0.4rem 0.9rem;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: var(--transition-fast);
}

.user-badge:hover {
    background: hsla(230, 90%, 62%, 0.12);
    border-color: hsla(230, 90%, 62%, 0.35);
    color: var(--primary);
}

/* ============================================================
   MODAL BASE
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    background: hsla(222, 50%, 10%, 0.92);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    border: 1px solid var(--glass-border-bright);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 60px var(--primary-glow);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.modal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.modal-overlay.open .modal-card {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.75rem 1.25rem;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.modal-header h3 i {
    color: var(--primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition-fast);
    font-family: inherit;
}

.modal-close:hover {
    background: hsla(0, 90%, 50%, 0.12);
    border-color: hsla(0, 90%, 50%, 0.3);
    color: #ff7b7b;
}

.modal-body {
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
}

.section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* ============================================================
   ACCOUNT LIST
   ============================================================ */
.account-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.account-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    position: relative;
}

.account-item.is-active {
    background: linear-gradient(135deg,
            hsla(230, 90%, 62%, 0.15),
            hsla(270, 85%, 65%, 0.1));
    border-color: hsla(230, 90%, 62%, 0.4);
    box-shadow: 0 0 20px hsla(230, 90%, 62%, 0.08);
}

.account-item.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 0 3px 3px 0;
}

.account-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.account-info {
    flex: 1;
    min-width: 0;
}

.account-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-host {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.1rem;
}

.account-expiry {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
    flex-shrink: 0;
}

.account-expiry.ok {
    background: hsla(145, 80%, 42%, 0.15);
    border: 1px solid hsla(145, 80%, 42%, 0.3);
    color: #10d98a;
}

.account-expiry.expired {
    background: hsla(0, 90%, 50%, 0.12);
    border: 1px solid hsla(0, 90%, 50%, 0.3);
    color: #ff7b7b;
}

.account-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.acc-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.78rem;
    transition: var(--transition-fast);
    font-family: inherit;
}

.acc-btn.switch-btn:hover {
    background: hsla(230, 90%, 62%, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.acc-btn.delete-btn:hover {
    background: hsla(0, 90%, 50%, 0.12);
    border-color: hsla(0, 90%, 50%, 0.35);
    color: #ff7b7b;
}

/* ============================================================
   ADD ACCOUNT FORM
   ============================================================ */
.add-account-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.modal-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.modal-input-group label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.modal-input-group label i {
    color: var(--primary);
    font-size: 0.75rem;
}

.modal-input-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: var(--transition);
}

.modal-input-group input::placeholder {
    color: var(--text-muted);
}

.modal-input-group input:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.modal-error {
    background: hsla(0, 90%, 50%, 0.1);
    border: 1px solid hsla(0, 90%, 50%, 0.25);
    color: #ff7b7b;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.83rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================================
   PROFILE PANEL
   ============================================================ */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--glass-border);
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 8px 24px var(--primary-glow);
    flex-shrink: 0;
}

.profile-name {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.profile-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-top: 0.25rem;
}

.profile-status-badge.active {
    background: hsla(145, 80%, 42%, 0.15);
    border: 1px solid hsla(145, 80%, 42%, 0.3);
    color: #10d98a;
}

.profile-status-badge.inactive {
    background: hsla(0, 90%, 50%, 0.12);
    border: 1px solid hsla(0, 90%, 50%, 0.3);
    color: #ff7b7b;
}

.profile-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.profile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    gap: 0.75rem;
}

.profile-row-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
    min-width: 110px;
}

.profile-row-label i {
    color: var(--primary);
    font-size: 0.8rem;
    width: 14px;
    text-align: center;
}

.profile-row-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    word-break: break-all;
}

.profile-row-value.password-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-pass-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.1rem 0.3rem;
    transition: var(--transition-fast);
    font-family: inherit;
}

.toggle-pass-btn:hover {
    color: var(--primary);
}

.expiry-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    margin-left: 0.4rem;
}

.expiry-badge.ok {
    background: hsla(145, 80%, 42%, 0.15);
    border: 1px solid hsla(145, 80%, 42%, 0.3);
    color: #10d98a;
}

.expiry-badge.expiring {
    background: hsla(40, 95%, 55%, 0.15);
    border: 1px solid hsla(40, 95%, 55%, 0.3);
    color: hsl(40, 95%, 65%);
}

.expiry-badge.expired {
    background: hsla(0, 90%, 50%, 0.12);
    border: 1px solid hsla(0, 90%, 50%, 0.3);
    color: #ff7b7b;
}

/* ============================================================
   SWITCH BUTTON — labeled
   ============================================================ */
.acc-btn.switch-btn {
    width: auto;
    padding: 0 0.75rem;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Active account badge */
.acc-active-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #10d98a;
    background: hsla(145, 80%, 42%, 0.12);
    border: 1px solid hsla(145, 80%, 42%, 0.25);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
}

/* ============================================================
   SWITCH OVERLAY — full-page fade on account switch
   ============================================================ */
#switch-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-base);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
}

#switch-overlay.visible {
    opacity: 1;
}

.switch-overlay-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    pointer-events: all;
    max-width: 320px;
}

.toast.visible {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    background: hsla(145, 80%, 10%, 0.92);
    border: 1px solid hsla(145, 80%, 42%, 0.35);
    color: #10d98a;
}

.toast-error {
    background: hsla(0, 90%, 10%, 0.92);
    border: 1px solid hsla(0, 90%, 50%, 0.35);
    color: #ff7b7b;
}

.toast-info {
    background: hsla(222, 50%, 12%, 0.92);
    border: 1px solid var(--glass-border-bright);
    color: var(--text-primary);
}

.toast i {
    font-size: 1rem;
    flex-shrink: 0;
}