/* CSS Custom Properties (Theme Variables) */
:root {
    /* Primary Colors */
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-light: #818cf8;
    --color-accent: #f59e0b;
    --color-accent-dark: #d97706;
    
    /* Background Colors */
    --bg-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --bg-surface: rgba(15, 23, 42, 0.8);
    --bg-surface-elevated: rgba(30, 41, 59, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-hover: rgba(255, 255, 255, 0.1);
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-accent: var(--color-primary-light);
    
    /* Border Colors */
    --border-primary: rgba(99, 102, 241, 0.3);
    --border-secondary: rgba(255, 255, 255, 0.1);
    --border-glass: rgba(255, 255, 255, 0.2);
    
    /* Shadow */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Glassmorphism */
    --glass-backdrop: blur(20px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.18);
    
    /* Transitions */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Typography */
    --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global smooth scrolling */
html {
    scroll-behavior: smooth;
}

*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-base);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Header */
header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    padding: 1.25rem 0;
    border-bottom: var(--border-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(auto, 2fr) minmax(200px, 1fr);
    align-items: center;
    gap: 1rem;
}

.header-left {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-width: 0;
}

.header-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
}

.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex-shrink: 0;
}

/* Top Right Logo */
.top-right-logo {
    height: 45px;
    width: auto;
    max-width: 150px;
    margin-right: 1rem;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    transition: var(--transition-fast);
    position: relative;
    top: -5px; /* Move logo up */
}

.top-right-logo:hover {
    filter: drop-shadow(2px 2px 8px rgba(99, 102, 241, 0.4));
    transform: scale(1.05);
}

/* Alternative: Fixed top header logo */
.header-top-logo {
    position: absolute;
    top: 10px;
    right: 20px;
    height: 40px;
    width: auto;
    max-width: 120px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    z-index: 1001;
    transition: var(--transition-fast);
}

.header-top-logo:hover {
    filter: drop-shadow(2px 2px 8px rgba(99, 102, 241, 0.4));
    transform: scale(1.05);
}

/* Video Player Logo Overlay */
.player-logo-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.player-logo {
    height: 80px;
    width: auto;
    max-width: 250px;
    filter: drop-shadow(3px 3px 8px rgba(0, 0, 0, 0.8));
    background: transparent;
    border-radius: 0;
}

.video-container {
    position: relative;
}

.video-container:hover .player-logo-overlay {
    opacity: 1;
}

/* Fullscreen player logo */
.video-container:fullscreen .player-logo-overlay,
.video-container:-webkit-full-screen .player-logo-overlay,
.video-container:-moz-full-screen .player-logo-overlay {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 2147483647;
    opacity: 1;
}

.video-container:fullscreen .player-logo,
.video-container:-webkit-full-screen .player-logo,
.video-container:-moz-full-screen .player-logo {
    height: 100px;
    max-width: 300px;
}

/* Hide stream modal close button */
.stream-modal-close {
    display: none !important;
}

/* Fill the space - Move Chnls container to top */
.sidebar-right {
    margin-top: -6rem !important;
    padding-top: 0.125rem !important;
    position: relative;
    z-index: 10;
}

.sidebar-right .sidebar-section:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Add visual content to fill space */
.sidebar-right::before {
    content: '';
    position: absolute;
    top: -2.5rem;
    left: 0;
    right: 0;
    height: 2.5rem;
    background: linear-gradient(180deg, 
        rgba(99, 102, 241, 0.15), 
        rgba(99, 102, 241, 0.08), 
        var(--bg-surface)
    );
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-top: 1px solid rgba(99, 102, 241, 0.3);
}

/* Add a subtle top accent line */
.sidebar-right::after {
    content: '';
    position: absolute;
    top: -2.5rem;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--color-primary-light), 
        transparent
    );
    opacity: 0.8;
}



/* Movies Header Controls */
.movies-header-controls {
    display: none;
    align-items: center;
    gap: 0.75rem;
    margin-left: 0.75rem;
    flex-wrap: nowrap;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    flex-shrink: 1;
}

.movies-header-controls .movies-search-container {
    min-width: 200px;
    max-width: 300px;
    flex-shrink: 1;
    flex-grow: 0;
}

.movies-header-controls .movies-search-input {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.movies-header-controls .movies-search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.movies-header-controls .movies-filters {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
    overflow: hidden;
}

.movies-header-controls .filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.movies-header-controls .filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.movies-header-controls .filter-btn.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border-color: var(--color-primary);
}

.movies-header-controls .filter-btn i {
    font-size: 0.8rem;
}

/* Mobile Movies Controls */
.mobile-movies-controls {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    display: none;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 80px; /* Position below header */
    z-index: 99;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.mobile-movies-search {
    width: 100%;
}

.mobile-movies-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mobile-movies-controls .movies-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 25px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.mobile-movies-controls .movies-search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
    outline: none;
}

.mobile-movies-controls .filter-btn {
    padding: 0.6rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    backdrop-filter: blur(5px);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mobile-movies-controls .filter-btn:hover,
.mobile-movies-controls .filter-btn.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.mobile-movies-controls .filter-btn i {
    font-size: 0.8rem;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.header-controls .btn {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    white-space: nowrap;
}

/* Large desktop adjustments */
@media (min-width: 1400px) {
    .header-container {
        padding: 0 3rem;
        gap: 2rem;
    }
    
    .header-center {
        gap: 2rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Medium desktop - tighten spacing */
@media (max-width: 1200px) and (min-width: 992px) {
    .header-container {
        grid-template-columns: minmax(150px, 1fr) minmax(auto, 2fr) minmax(150px, 1fr);
        gap: 0.75rem;
    }
    
    .header-center {
        gap: 1rem;
    }
    
    .tab-btn {
        padding: 0.65rem 1rem;
        font-size: 0.8rem;
    }
}

/* Tablet layout */
@media (max-width: 991px) and (min-width: 769px) {
    .header-container {
        grid-template-columns: minmax(120px, 1fr) minmax(auto, 2fr) minmax(120px, 1fr);
        padding: 0 1.5rem;
        gap: 0.5rem;
    }
    
    .header-center {
        gap: 0.75rem;
    }
    
    .tab-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.75rem;
    }
    
    /* Keep text visible on tablet */
    .tab-btn span {
        display: inline;
    }
}

/* Mobile layout */
@media (max-width: 768px) {
    header {
        position: sticky;
        top: 0;
        z-index: 1000;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    
    .header-container {
        margin-left: 0;
        padding: 0 1rem;
        grid-template-columns: auto 1fr auto;
        gap: 0.5rem;
        max-width: none;
    }
    
    .header-center {
        justify-content: flex-start;
        gap: 0.4rem;
        flex-wrap: nowrap;
    }
    
    
    /* Mobile: Show only icons for header control buttons */
    .header-right .btn,
    .header-center .btn {
        padding: 0.75rem;
        font-size: 1.1rem;
        min-width: 48px;
        min-height: 48px;
        border-radius: var(--radius-lg);
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .header-right .btn span,
    .header-right .btn .btn-text,
    .header-center .btn .btn-text,
    .header-right .btn .btn-text-mobile {
        display: none;
    }
    
    .header-right .btn i,
    .header-center .btn i {
        margin: 0;
    }
    
    /* Hide movies controls on mobile - they'll be shown below header */
    .movies-header-controls {
        display: none !important;
    }
    
    /* Mobile top-right logo */
    .top-right-logo {
        height: 35px;
        max-width: 100px;
        margin-right: 0.5rem;
    }
    
    /* Mobile header-top-logo */
    .header-top-logo {
        top: 5px;
        right: 10px;
        height: 30px;
        max-width: 80px;
    }
    
    /* Mobile player logo */
    .player-logo-overlay {
        top: 15px;
        right: 15px;
    }
    
    .player-logo {
        height: 50px;
        max-width: 150px;
    }
    
    .video-container:fullscreen .player-logo,
    .video-container:-webkit-full-screen .player-logo,
    .video-container:-moz-full-screen .player-logo {
        height: 70px;
        max-width: 200px;
    }
    
    /* Mobile adjustments - Fill space above Chnls */
    .sidebar-right {
        margin-top: -4.5rem !important;
        padding-top: 0.0625rem !important;
    }
    
    .sidebar-right::before {
        height: 1.5rem;
        top: -1.5rem;
    }
    
    .sidebar-right::after {
        top: -1.5rem;
    }
    
}

/* Large desktop - full controls */
@media (min-width: 1400px) {
    .movies-header-controls .movies-search-container {
        min-width: 250px;
        max-width: 350px;
    }
    
    .movies-header-controls .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Medium desktop - compact controls */
@media (max-width: 1399px) and (min-width: 1200px) {
    .movies-header-controls {
        gap: 0.5rem;
        margin-left: 0.5rem;
    }
    
    .movies-header-controls .movies-search-container {
        min-width: 180px;
        max-width: 250px;
    }
    
    .movies-header-controls .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        gap: 0.25rem;
    }
}

/* Small desktop - hide text in filter buttons */
@media (max-width: 1199px) and (min-width: 992px) {
    .movies-header-controls {
        gap: 0.4rem;
        margin-left: 0.5rem;
    }
    
    .movies-header-controls .movies-search-container {
        min-width: 150px;
        max-width: 200px;
    }
    
    .movies-header-controls .filter-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .movies-header-controls .filter-btn span {
        display: none;
    }
}

/* Tablet - icon only filters */
@media (max-width: 991px) and (min-width: 769px) {
    .movies-header-controls {
        gap: 0.3rem;
        margin-left: 0.25rem;
    }
    
    .movies-header-controls .movies-search-container {
        min-width: 120px;
        max-width: 160px;
    }
    
    .movies-header-controls .filter-btn {
        padding: 0.4rem;
        font-size: 0.7rem;
        min-width: 32px;
        justify-content: center;
    }
    
    .movies-header-controls .filter-btn span {
        display: none;
    }
    
    .movies-header-controls .filter-btn i {
        margin: 0;
    }
}

header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.025em;
}

.header-logo {
    height: 40px;
    width: auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

/* Larger logo variant */
.header-logo-large {
    height: 65px !important;
    width: auto;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.4));
    transition: var(--transition-normal);
}

.header-logo-large:hover {
    transform: scale(1.05);
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.5));
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .header-logo-large {
        height: 55px !important;
    }
    
    header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .header-logo-large {
        height: 45px !important;
    }
    
    
    /* Stream actions container */
    .stream-actions {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }
    
    #removeDuplicatesBtn {
        background: linear-gradient(135deg, #f59e0b, #d97706);
        border: 1px solid rgba(245, 158, 11, 0.3);
    }
    
    #removeDuplicatesBtn:hover {
        background: linear-gradient(135deg, #d97706, #b45309);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }
    
    /* Search results styling and animations */
    .stream-item.hidden {
        display: none;
    }
    
    .stream-item {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: top center;
    }
    
/* Responsive Design for Stylistic Search Bar */
@media (max-width: 768px) {
    .search-container {
        margin: 1rem 0;
    }
    
    .search-container::before {
        animation-duration: 6s;
    }
    
    .stream-search-input {
        padding: 0.9rem 2.8rem 0.9rem 2.8rem;
        font-size: 0.95rem;
        transform: none;
    }
    
    .stream-search-input:hover {
        transform: translateY(-2px);
    }
    
    .stream-search-input:focus {
        transform: translateY(-2px);
    }
    
    .search-icon {
        left: 1rem;
        font-size: 1rem;
    }
    
    .search-container:hover .search-icon {
        transform: translateY(-50%) scale(1.05) rotate(10deg);
    }
    
    .search-container:focus-within .search-icon {
        transform: translateY(-50%) scale(1.1) rotate(15deg);
    }
    
    .clear-search-btn {
        right: 0.9rem;
        width: 1.6rem;
        height: 1.6rem;
        font-size: 0.8rem;
    }
}
    
@media (max-width: 480px) {
    .search-container {
        margin: 0.9rem 0;
    }
    
    .search-container::before {
        animation-duration: 10s;
    }
    
    .stream-search-input {
        padding: 0.8rem 2.5rem 0.8rem 2.5rem;
        font-size: 0.9rem;
        transform: none;
    }
    
    .stream-search-input:hover {
        transform: translateY(-1px);
    }
    
    .stream-search-input:focus {
        transform: translateY(-1px);
    }
    
    .stream-search-input::placeholder {
        font-size: 0.85rem;
    }
    
    .search-icon {
        left: 0.9rem;
        font-size: 0.95rem;
    }
    
    .search-container:hover .search-icon {
        transform: translateY(-50%) scale(1.02) rotate(8deg);
    }
    
    .search-container:focus-within .search-icon {
        transform: translateY(-50%) scale(1.05) rotate(12deg);
    }
    
    .clear-search-btn {
        right: 0.8rem;
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.75rem;
    }
    
    .clear-search-btn:hover {
        transform: translateY(-50%) scale(1.1) rotate(90deg);
    }
    
    /* Reduce animation intensity on mobile */
    @keyframes gradientMove {
        0%, 100% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
    }
    
    @keyframes searchPulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.8; }
    }
}
    
    
    .no-search-results {
        padding: 2rem 1rem;
        text-align: center;
        color: var(--text-muted);
        background: var(--bg-glass);
        border-radius: var(--radius-md);
        border: 1px solid var(--border-secondary);
        margin: 1rem 0;
    }
    
    .no-search-results i {
        font-size: 2rem;
        margin-bottom: 1rem;
        color: var(--text-muted);
        opacity: 0.5;
    }
    
    /* Search highlighting and results */
    .search-matched {
        border: 2px solid #4CAF50 !important;
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.3) !important;
        animation: searchHighlight 0.5s ease-in-out;
    }
    
    @keyframes searchHighlight {
        0% { transform: scale(1); }
        50% { transform: scale(1.02); }
        100% { transform: scale(1); }
    }
    
    .external-stream-item.search-matched .stream-info h4 {
        color: #4CAF50 !important;
        font-weight: 700;
    }
    
    /* Search highlighting */
    .stream-item mark {
        background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
        color: var(--text-primary);
        padding: 0.1em 0.3em;
        border-radius: 0.2em;
        font-weight: 600;
    }
    
    
    /* External Streams section styling */
    .section-header h4 {
        font-size: 1rem;
        font-weight: 600;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--text-primary);
    }
    
    .section-header h4 i {
        font-size: 0.9rem;
        color: var(--color-primary-light);
    }
    
    header h1 {
        font-size: 1.75rem;
    }
}

/* Stylistic Animated Search Bar - Desktop Version */
.search-container {
    position: relative;
    margin: 1.2rem 0;
    max-width: 100%;
}

.search-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        #6366f1, #8b5cf6, #a855f7, #ec4899, #f59e0b, #10b981, #06b6d4, #6366f1);
    background-size: 400% 400%;
    border-radius: 50px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: gradientMove 8s ease-in-out infinite;
}

.search-container:hover::before {
    opacity: 0.7;
}

.search-container:focus-within::before {
    opacity: 1;
    animation-duration: 3s;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
}

.stream-search-input {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 1rem 3rem 1rem 3rem;
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.95) 0%,
        rgba(30, 41, 59, 0.9) 50%,
        rgba(51, 65, 85, 0.95) 100%);
    border: 2px solid transparent;
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    outline: none;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 4px 20px rgba(0, 0, 0, 0.3);
}

.stream-search-input:hover {
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.98) 0%,
        rgba(30, 41, 59, 0.95) 50%,
        rgba(51, 65, 85, 0.98) 100%);
    transform: translateY(-3px);
    box-shadow: 
        inset 0 2px 6px rgba(0, 0, 0, 0.15),
        0 8px 30px rgba(99, 102, 241, 0.2),
        0 4px 20px rgba(139, 92, 246, 0.15);
}

.stream-search-input:focus {
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 1) 0%,
        rgba(30, 41, 59, 0.98) 50%,
        rgba(51, 65, 85, 1) 100%);
    transform: translateY(-4px);
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.1),
        0 12px 40px rgba(99, 102, 241, 0.3),
        0 6px 25px rgba(139, 92, 246, 0.2),
        0 0 0 1px rgba(99, 102, 241, 0.5);
}

.stream-search-input::placeholder {
    color: rgba(203, 213, 225, 0.6);
    font-weight: 400;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.stream-search-input:focus::placeholder {
    color: rgba(203, 213, 225, 0.4);
    transform: translateX(8px);
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(203, 213, 225, 0.7);
    pointer-events: none;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.3));
}

.search-container:hover .search-icon {
    transform: translateY(-50%) scale(1.1) rotate(15deg);
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.5));
}

.search-container:focus-within .search-icon {
    transform: translateY(-50%) scale(1.15) rotate(25deg);
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.7));
    animation: searchPulse 2s ease-in-out infinite;
}

@keyframes searchPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.clear-search-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.8),
        rgba(220, 38, 38, 0.9));
    border: none;
    color: rgba(255, 255, 255, 0.95);
    padding: 0.4rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    backdrop-filter: blur(10px);
}

.clear-search-btn:hover {
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 1),
        rgba(220, 38, 38, 1));
    color: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.15) rotate(90deg);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.5);
}

.clear-search-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* Enhanced glass effect overlay */
.search-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%,
        transparent 50%,
        rgba(255, 255, 255, 0.05) 100%);
    border-radius: 50px;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-container:hover::after {
    opacity: 1;
}



/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-normal);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    letter-spacing: 0.025em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: var(--transition-normal);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4), var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-secondary);
    border: var(--border-secondary);
}

.btn-secondary:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
    border-color: var(--border-glass);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-warning {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: #1f2937;
    border-color: var(--color-accent);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #fbbf24, var(--color-accent));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4), var(--shadow-md);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: var(--text-primary);
    border-color: #ef4444;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4), var(--shadow-md);
}

/* Main layout - Edge-to-edge full width */
main {
    width: 100%;
    margin: 0;
    padding: 1rem;
    min-height: calc(100vh - 80px); /* Full height minus header */
    display: flex;
    flex-direction: column;
}

/* Video player section - Full height */
.streaming-layout .main-player {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.main-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary-light), transparent);
    opacity: 0.5;
}

.video-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-secondary);
    flex: 1;
    min-height: 400px;
}

#mainVideo,
#streamingVideo,
#moviesVideo {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    object-fit: contain;
    border-radius: var(--radius-md);
}

/* Video Overlays - Universal styles */
.video-overlay,
#streamingVideoOverlay,
#moviesVideoOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: var(--radius-md);
}

.video-overlay h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.025em;
}

.video-overlay p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Play Button */
.play-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--bg-surface);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-xl);
}

.play-button:hover {
    background: var(--bg-glass-hover);
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4), var(--shadow-xl);
}

.play-button i {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Video Loading State */
.video-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    text-align: center;
}

.video-loading .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-secondary);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.video-loading h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.025em;
}

.video-loading p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    opacity: 0.8;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.video-info {
    padding: 1rem 0 0;
    flex-shrink: 0;
}

.video-info h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.stream-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.stream-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-secondary);
}

/* Stream Title with Logo */
.stream-title-with-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.stream-title-logo {
    height: 48px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-primary);
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.stream-title-logo:hover {
    transform: scale(1.05);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
}

.stream-title-text {
    flex: 1;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    line-height: 1.2;
}

/* Responsive adjustments for stream title logo */
@media (max-width: 768px) {
    .stream-title-logo {
        height: 40px;
        max-width: 60px;
    }
    
    .stream-title-text {
        font-size: 1.5rem;
    }
    
    .stream-title-with-logo {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .stream-title-logo {
        height: 36px;
        max-width: 50px;
    }
    
    .stream-title-text {
        font-size: 1.25rem;
    }
    
    .stream-title-with-logo {
        gap: 0.5rem;
    }
}

/* Hide viewer counts and external stream indicators */
.viewer-count,
.stream-type-indicator,
.external-indicator {
    display: none !important;
}

/* Sidebar - Updated for flex layout */
.sidebar {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: fit-content;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    contain: layout style;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 140px);
}

/* Right sidebar specific styles */
.sidebar-right {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden; /* Changed from overflow-y: auto to allow individual sections to scroll */
    margin-bottom: 0;
    min-height: calc(100vh - 140px);
    height: calc(100vh - 140px); /* Fixed height for desktop */
    display: flex;
    flex-direction: column;
    /* Smooth scrolling for sidebar */
    scroll-behavior: smooth;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary-light), transparent);
    opacity: 0.5;
}

.sidebar-section {
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1 1 0; /* Equal distribution on desktop */
    /* Independent scrolling for desktop */
    min-height: 0;
}

.sidebar-section:last-child {
    margin-bottom: 0;
    flex-grow: 1.2; /* Give last section slightly more space if needed */
}

/* Ensure all sidebar section children respect container width */
.sidebar-section > * {
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Force containment for all stream items and content */
.external-streams-list,
.stream-list,
#externalStreamsList,
#regularStreamsSection {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    contain: layout style;
    flex-grow: 1;
    min-height: 150px;
    /* Independent scrolling on desktop */
    height: 100%; /* Use full available height from flex parent */
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.6) rgba(255, 255, 255, 0.1);
    /* Smooth scrolling */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
}

.external-stream-item,
.stream-item {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure stream content elements don't overflow */
.stream-title,
.stream-description,
.stream-category,
.external-stream-item h4,
.external-stream-item p {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Allow wrapping for multi-line content in list view */
.external-streams-list:not(.layout-compact) .stream-title,
.external-streams-list:not(.layout-compact) .external-stream-item h4 {
    white-space: normal;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sidebar-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.025em;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.section-header h4 {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.section-header .stream-actions {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
    max-width: none;
    overflow: visible;
    justify-content: flex-end;
    align-items: center;
}

.section-header .stream-actions .btn {
    margin-left: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.stream-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 300px;
    flex-grow: 1;
}

.stream-item {
    background: var(--bg-glass);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-secondary);
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stream-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
    transform: scaleY(0);
    transform-origin: top;
    transition: var(--transition-normal);
}

.stream-item:hover::before {
    transform: scaleY(1);
}

.stream-item:hover {
    background: var(--bg-glass-hover);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-glass);
}

.stream-item.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--color-primary);
}

.stream-item.active::before {
    transform: scaleY(1);
}


.stream-item h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.stream-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.stream-item .viewers {
    font-size: 0.75rem;
    color: var(--color-accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.no-streams {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-secondary);
    margin: 1rem 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}
.no-streams i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--text-muted);
    opacity: 0.7;
}

.no-streams p {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Additional content sections */
.category-list,
.streamer-list,
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-item {
    background: var(--bg-glass);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-secondary);
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
    transform: scaleY(0);
    transform-origin: top;
    transition: var(--transition-normal);
}

.category-item:hover::before {
    transform: scaleY(1);
}

.category-item:hover {
    background: var(--bg-glass-hover);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-glass);
}

.category-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.category-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.streamer-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-glass);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-secondary);
    cursor: pointer;
    transition: var(--transition-normal);
}

.streamer-item:hover {
    background: var(--bg-glass-hover);
    transform: translateX(2px);
    border-color: var(--border-glass);
}

.streamer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.streamer-avatar::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--text-primary);
    mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>') no-repeat center;
    mask-size: contain;
    -webkit-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>') no-repeat center;
    -webkit-mask-size: contain;
}

.streamer-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.streamer-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.schedule-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-glass);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-secondary);
    cursor: pointer;
    transition: var(--transition-normal);
}

.schedule-item:hover {
    background: var(--bg-glass-hover);
    transform: translateX(2px);
    border-color: var(--border-glass);
}

.schedule-time {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-accent);
    min-width: 50px;
    text-align: center;
    background: rgba(245, 158, 11, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.schedule-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.schedule-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: var(--glass-border);
    margin: 5% auto;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 650px;
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary-light), transparent);
    opacity: 0.8;
}

.modal-header {
    padding: 1.75rem;
    border-bottom: var(--border-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: var(--text-accent);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.025em;
}

.close {
    color: var(--text-muted);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-normal);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.close:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
}

.modal-body {
    padding: 1.75rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-accent);
    font-size: 0.95rem;
    letter-spacing: 0.025em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: var(--border-secondary);
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), var(--shadow-sm);
}

.stream-source-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.radio-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #4a90e2;
}

.radio-option input[type="radio"] {
    width: auto;
}

.radio-option input[type="radio"]:checked + i {
    color: #4a90e2;
}

.stream-preview {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

#previewVideo {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Stream controls */
.stream-controls {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(0, 0, 0, 0.9);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.controls-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.live-indicator {
    background: #dc3545;
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    animation: pulse 2s infinite;
}

.live-indicator i {
    font-size: 0.6rem;
}

.control-buttons {
    display: flex;
    gap: 0.5rem;
}

.control-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Chat section */
.chat-section {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 400px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header h4 {
    color: #4a90e2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.chat-input button {
    padding: 0.5rem;
    width: 40px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Enhanced Desktop Landscape Resolution Support */
@media (min-width: 1025px) and (orientation: landscape) {
    /* Ensure streaming layout uses full viewport width */
    .streaming-layout {
        display: grid;
        grid-template-columns: minmax(250px, 300px) 1fr minmax(350px, 400px);
        gap: 2rem;
        width: 100vw;
        min-height: calc(100vh - 140px);
        align-items: start;
    }
    
    /* Main player section takes available space */
    .streaming-layout .main-player {
        width: 100%;
        min-height: calc(100vh - 160px);
        display: flex;
        flex-direction: column;
    }
    
    /* Video container responsive to landscape */
    .video-container {
        flex: 1;
        min-height: clamp(400px, 60vh, 800px);
        width: 100%;
        position: relative;
    }
    
    /* Sidebar adjustments for landscape */
    .sidebar-left {
        max-height: calc(100vh - 140px);
        overflow-y: auto;
        position: sticky;
        top: 140px;
    }
    
    .sidebar-right {
        max-height: calc(100vh - 140px);
        overflow: hidden;
        position: sticky;
        top: 140px;
    }
    
    /* Featured movies grid optimization for landscape */
    .featured-movies-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    /* Header optimizations for wide screens */
    .header-container {
        max-width: 100vw;
        padding: 0 3rem;
    }
    
    /* Movies grid for landscape viewing */
    .movies-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 200px));
        gap: 2rem;
        justify-content: center;
        max-width: 100%;
    }
}

/* Ultra-wide desktop support (21:9, 32:9 monitors) */
@media (min-width: 1920px) and (orientation: landscape) {
    .streaming-layout {
        grid-template-columns: minmax(300px, 350px) 1fr minmax(400px, 500px);
        gap: 3rem;
        padding: 0 2rem;
    }
    
    .header-container {
        padding: 0 4rem;
    }
    
    .featured-movies-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 2rem;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 220px));
        gap: 2.5rem;
    }
}

/* Standard desktop resolutions */
@media (max-width: 1920px) and (min-width: 1025px) {
    main {
        width: 100%;
        margin: 0;
        padding: 1rem;
        box-sizing: border-box;
    }
    
    .header-container {
        width: 100%;
        margin: 0;
        padding: 0 2rem;
        box-sizing: border-box;
    }
}

/* Legacy responsive design - Full width always */
@media (max-width: 1400px) {
    main {
        width: 100%;
        margin: 0;
        padding: 1rem;
    }
    
    .header-container {
        width: 100%;
        margin: 0;
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    main {
        padding: 0;
        margin: 0;
        min-height: calc(100vh - 80px); /* Full height minus header */
        overflow-x: hidden;
    }
    
    .streaming-layout {
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - 80px);
        gap: 0;
    }
    
    .streaming-layout .main-player {
        position: relative;
        background: var(--bg-primary);
        padding: 0;
        margin: 0;
        flex-shrink: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        width: 100%;
        order: 1;
    }
    
    #mainVideo {
        height: clamp(200px, 35vh, 280px) !important; /* Responsive mobile height */
        width: 100%;
        object-fit: contain;
        border-radius: var(--radius-sm);
        box-shadow: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        background: #000;
    }
    
    .video-container {
        margin: 0.5rem;
        border-radius: var(--radius-md);
        overflow: hidden;
        background: #000;
        width: calc(100% - 1rem);
        position: relative;
        box-shadow: var(--shadow-md);
    }
    
    .video-info {
        padding: 1rem;
        background: var(--bg-primary);
    }
    
    .video-info h2 {
        font-size: 1.35rem;
        margin-bottom: 0.5rem;
    }
    
    .stream-meta {
        gap: 1rem;
        font-size: 0.85rem;
    }
    
    /* Hide viewer count and external stream indicators on mobile */
    .stream-item .viewer-count,
    .stream-item .stream-type,
    .external-stream-item .stream-type {
        display: none;
    }
    
    .sidebar,
    .sidebar-right {
        flex: 1;
        overflow: hidden; /* Let individual sections handle scrolling */
        overflow-x: hidden;
        padding: 1rem;
        background: var(--bg-primary);
        order: 2;
        margin-bottom: 0;
        border-radius: 0;
        box-shadow: none;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        scroll-behavior: smooth;
        position: static;
        max-height: none;
        min-height: 50vh;
        /* Enable flex layout for mobile external streams */
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Custom scrollbar for mobile */
    .sidebar::-webkit-scrollbar {
        width: 4px;
    }
    
    .sidebar::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .sidebar::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }
    
    .sidebar::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }
    
    /* Mobile sidebar sections flex layout */
    .sidebar-section {
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
    }
    
    /* Mobile external streams list */
    .external-streams-list,
    .stream-list,
    #externalStreamsList,
    #regularStreamsSection {
        overflow-y: auto !important;
        flex-grow: 1 !important;
        height: 100% !important;
        min-height: 0 !important;
    }
    
    .header-container {
        padding: 0 1rem;
        margin-left: auto !important; /* Override desktop margins on mobile */
        padding-left: 1rem !important;
    }
    
    header h1 {
        font-size: 1.75rem;
    }
    
    .header-logo {
        height: 32px;
    }
    
    .stream-source-options {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 95%;
    }
    
    .stream-controls {
        position: relative;
        bottom: auto;
        right: auto;
        margin: 1rem 0;
    }
    
    .chat-section {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 100%;
        margin-top: 1rem;
    }
    
    .category-item,
    .streamer-item,
    .schedule-item {
        transform: none; /* Disable hover transforms on mobile */
    }
    
    .category-item:hover,
    .streamer-item:hover,
    .schedule-item:hover {
        transform: none;
    }
}

/* Additional mobile responsive styles for very small screens */
@media (max-width: 480px) {
    main {
        min-height: calc(100vh - 70px); /* Slightly smaller header on mobile */
    }
    
    body {
        overflow-x: hidden;
    }
    
    .main-player {
        padding: 0;
        margin: 0 -0.75rem;
        width: calc(100% + 1.5rem);
    }
    
    #mainVideo {
        height: clamp(180px, 30vh, 220px) !important; /* Better size for small screens */
    }
    
    .video-info {
        padding: 0.75rem;
        background: var(--bg-primary);
    }
    
    .video-info h2 {
        font-size: 1.15rem;
    }
    
    .stream-meta {
        font-size: 0.8rem;
        gap: 1rem;
    }
    
    .sidebar {
        padding: 0.75rem;
    }
    
    .sidebar-section {
        margin-bottom: 1.5rem;
    }
    
    .stream-item {
        padding: 0.75rem;
    }
}

/* Landscape orientation optimization for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    #mainVideo {
        height: 300px !important;
        max-height: 60vh;
    }
    
    .main-player {
        margin-bottom: 1rem;
    }
}

/* Mobile fullscreen landscape mode CSS */
@media screen and (max-width: 768px) {
    /* Force landscape orientation when in fullscreen */
    video:fullscreen,
    video:-webkit-full-screen,
    video:-moz-full-screen,
    video:-ms-fullscreen {
        width: 100vw !important;
        height: 100vh !important;
        object-fit: contain !important;
        background: #000 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 999999 !important;
    }
    
    /* Mobile landscape fullscreen container */
    .video-container:fullscreen,
    .video-container:-webkit-full-screen,
    .video-container:-moz-full-screen,
    .video-container:-ms-fullscreen {
        width: 100vw !important;
        height: 100vh !important;
        background: #000 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 999999 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Fullscreen video inside container */
    .video-container:fullscreen video,
    .video-container:-webkit-full-screen video,
    .video-container:-moz-full-screen video,
    .video-container:-ms-fullscreen video {
        width: 100vw !important;
        height: 100vh !important;
        object-fit: contain !important;
    }
    
    /* YouTube iframe fullscreen */
    .video-container:fullscreen iframe,
    .video-container:-webkit-full-screen iframe,
    .video-container:-moz-full-screen iframe,
    .video-container:-ms-fullscreen iframe {
        width: 100vw !important;
        height: 100vh !important;
    }
}

/* Fullscreen landscape mode for mobile devices */
@media screen and (max-device-width: 768px) and (orientation: portrait) {
    /* When mobile device is in portrait but video goes fullscreen, suggest landscape */
    body.fullscreen-active {
        overflow: hidden;
    }
    
    body.fullscreen-active::before {
        content: "↻ Rotate device for better viewing experience";
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 0.5rem 1rem;
        border-radius: 4px;
        font-size: 0.8rem;
        z-index: 1000000;
        animation: fadeInOut 3s ease-in-out;
    }
    
    @keyframes fadeInOut {
        0%, 100% { opacity: 0; }
        20%, 80% { opacity: 1; }
    }
}

/* Spotify-Style Music Section */
.spotify-layout {
    display: flex;
    height: calc(100vh - 140px);
    background: #000;
    color: #fff;
    font-family: 'Circular', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    position: relative;
}

/* Spotify Sidebar */
.spotify-sidebar {
    width: 280px;
    background: #121212;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #282828;
    position: relative;
    overflow: hidden;
}

.sidebar-header {
    padding: 24px 24px 0 24px;
    margin-bottom: 16px;
}

.sidebar-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-nav {
    padding: 0 8px;
    margin-bottom: 24px;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    color: #b3b3b3;
    font-weight: 500;
    font-size: 14px;
}

.sidebar-nav .nav-item:hover {
    background-color: #1a1a1a;
    color: #fff;
}

.sidebar-nav .nav-item.active {
    background-color: #1db954;
    color: #fff;
}

.sidebar-nav .nav-item i {
    font-size: 24px;
    width: 24px;
}

.sidebar-divider {
    height: 1px;
    background-color: #282828;
    margin: 8px 24px 16px 24px;
}

.sidebar-playlists {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px;
}

.sidebar-playlists h3 {
    color: #b3b3b3;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 16px 16px 8px 16px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    color: #b3b3b3;
    font-size: 14px;
}

.playlist-item:hover {
    background-color: #1a1a1a;
    color: #fff;
}

.playlist-item i {
    font-size: 16px;
    width: 16px;
}

/* Spotify Main Content */
.spotify-main {
    flex: 1;
    background: linear-gradient(180deg, #1e3264 0%, #121212 100%);
    overflow-y: auto;
    position: relative;
}

.content-section {
    display: none;
    padding: 24px;
    min-height: calc(100vh - 164px);
}

.content-section.active {
    display: block;
}

.section-header h1,
.search-header h1,
.library-header h1 {
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 24px 0;
    letter-spacing: -0.04em;
}

/* Quick Picks */
.quick-picks {
    margin-bottom: 48px;
}

.quick-picks h2 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px 0;
    letter-spacing: -0.04em;
}

.quick-picks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.quick-pick-item {
    display: flex;
    align-items: center;
    background: #282828;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: background-color 0.3s;
    height: 80px;
}

.quick-pick-item:hover {
    background: #3e3e3e;
}

.quick-pick-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1db954, #1ed760);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-pick-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-pick-image i {
    font-size: 32px;
    color: #fff;
}

.quick-pick-info {
    padding: 0 16px;
    flex: 1;
    min-width: 0;
}

.quick-pick-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Albums Grid */
.albums-grid,
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.album-card,
.category-card {
    background: #181818;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
}

.album-card:hover,
.category-card:hover {
    background: #282828;
}

.album-image,
.category-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    background: linear-gradient(135deg, #1db954, #1ed760);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.album-image img,
.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-image i,
.category-image i {
    font-size: 48px;
    color: #fff;
}

.play-button {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 48px;
    height: 48px;
    background: #1db954;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s;
    box-shadow: 0 8px 8px rgba(0,0,0,0.3);
}

.album-card:hover .play-button {
    opacity: 1;
    transform: translateY(0);
}

.play-button i {
    font-size: 16px !important;
    color: #000 !important;
    margin-left: 2px;
}

.album-title,
.category-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.album-artist {
    font-size: 14px;
    color: #b3b3b3;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Search Section */
.search-bar {
    position: relative;
    max-width: 364px;
    margin-bottom: 32px;
}

.search-bar i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #121212;
    font-size: 16px;
}

.search-bar input {
    width: 100%;
    height: 48px;
    border-radius: 500px;
    border: none;
    background: #fff;
    padding: 12px 12px 12px 40px;
    font-size: 14px;
    color: #121212;
    font-weight: 400;
    outline: none;
}

.search-bar input::placeholder {
    color: #121212;
    opacity: 0.7;
}

/* Spotify Bottom Player */
.spotify-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: #181818;
    border-top: 1px solid #282828;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    padding: 0 16px;
    z-index: 1000;
}

.player-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.track-image {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    background: #282828;
    overflow: hidden;
    flex-shrink: 0;
}

.track-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-info {
    min-width: 0;
    flex: 1;
}

.track-name {
    font-size: 14px;
    font-weight: 400;
    color: #fff;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 11px;
    color: #b3b3b3;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.like-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: color 0.3s;
    flex-shrink: 0;
}

.like-btn:hover {
    color: #fff;
}

.like-btn.liked {
    color: #1db954;
}

/* Player Center Controls */
.player-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 722px;
    margin: 0 auto;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.control-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: color 0.3s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    color: #fff;
    transform: scale(1.06);
}

.control-btn:active {
    transform: scale(1);
}

.play-btn {
    width: 32px;
    height: 32px;
    background: #fff;
    color: #000;
    border-radius: 50%;
    font-size: 14px;
}

.play-btn:hover {
    background: #fff;
    color: #000;
    transform: scale(1.06);
}

/* Progress Bar */
.progress-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 508px;
}

.time-current,
.time-total {
    font-size: 11px;
    color: #b3b3b3;
    min-width: 40px;
    text-align: center;
}

.progress-container {
    flex: 1;
    height: 4px;
    background: #4f4f4f;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.progress {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-handle {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0%;
    opacity: 0;
    transition: opacity 0.3s;
}

.progress-container:hover .progress-handle {
    opacity: 1;
}

/* Player Right */
.player-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 93px;
    height: 4px;
    background: #4f4f4f;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.volume-bar {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    width: 100%;
}

.volume-handle {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.volume-control:hover .volume-handle {
    opacity: 1;
}

/* Artist Detail Section */
.artist-hero {
    background: linear-gradient(180deg, rgba(30, 50, 100, 0.8), rgba(18, 18, 18, 0.8));
    padding: 32px 24px;
    margin: -24px -24px 32px -24px;
    display: flex;
    align-items: end;
    min-height: 340px;
    position: relative;
}

.artist-hero-content {
    display: flex;
    align-items: end;
    gap: 24px;
}

.artist-image {
    width: 232px;
    height: 232px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1db954, #1ed760);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 60px rgba(0,0,0,0.5);
}

.artist-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-image i {
    font-size: 96px;
    color: #fff;
}

.artist-info h1 {
    font-size: 96px;
    font-weight: 900;
    color: #fff;
    margin: 0;
    letter-spacing: -0.04em;
    line-height: 0.9;
}

.artist-info .verified {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #1db954;
    font-size: 14px;
    font-weight: 500;
}

.artist-info .monthly-listeners {
    font-size: 16px;
    color: #b3b3b3;
    margin-top: 8px;
}

/* Track List */
.track-list {
    background: rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.track-item {
    display: grid;
    grid-template-columns: 16px 1fr auto auto auto;
    gap: 16px;
    align-items: center;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    min-height: 56px;
}

.track-item:hover {
    background: rgba(255,255,255,0.1);
}

.track-number {
    font-size: 16px;
    color: #b3b3b3;
    text-align: center;
    font-feature-settings: 'tnum';
}

.track-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.track-image-small {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #282828;
    overflow: hidden;
    flex-shrink: 0;
}

.track-image-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-details {
    min-width: 0;
    flex: 1;
}

.track-title {
    font-size: 16px;
    font-weight: 400;
    color: #fff;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 14px;
    color: #b3b3b3;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-plays {
    font-size: 14px;
    color: #b3b3b3;
    font-feature-settings: 'tnum';
}

.track-duration {
    font-size: 14px;
    color: #b3b3b3;
    font-feature-settings: 'tnum';
    min-width: 40px;
    text-align: right;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .spotify-layout {
        flex-direction: column;
        height: calc(100vh - 80px);
    }
    
    .spotify-sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
        overflow-y: auto;
    }
    
    .spotify-main {
        flex: 1;
        overflow-y: auto;
    }
    
    .spotify-player {
        grid-template-columns: 1fr;
        height: auto;
        padding: 16px;
        gap: 16px;
    }
    
    .player-left {
        justify-content: center;
    }
    
    .player-right {
        justify-content: center;
    }
    
    .quick-picks-grid {
        grid-template-columns: 1fr;
    }
    
    .albums-grid,
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }
    
    .artist-info h1 {
        font-size: 48px;
    }
    
    .artist-hero {
        min-height: 240px;
        flex-direction: column;
        text-align: center;
    }
    
    .artist-image {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 480px) {
    .content-section {
        padding: 16px;
    }
    
    .section-header h1,
    .search-header h1,
    .library-header h1 {
        font-size: 24px;
    }
    
    .quick-picks h2 {
        font-size: 20px;
    }
    
    .quick-pick-item {
        height: 64px;
    }
    
    .quick-pick-image {
        width: 64px;
        height: 64px;
    }
    
    .artist-info h1 {
        font-size: 32px;
    }
}

/* Music Playback Modal Styles */
.music-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    animation: fadeIn 0.3s ease;
}

.music-modal-content {
    background: transparent;
    margin: 10% auto;
    width: 90%;
    max-width: 500px;
    animation: slideIn 0.3s ease;
    position: relative;
    overflow: visible;
}

.music-modal-header {
    display: none;
}

.music-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.music-modal-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.music-modal-body {
    padding: 0;
}

.playback-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.playback-option {
    background: var(--bg-glass);
    border: 2px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    cursor: pointer;
    transition: var(--transition-normal);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.playback-option:hover {
    background: var(--bg-glass-hover);
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.playback-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    opacity: 0;
    transition: var(--transition-normal);
}

.playback-option:hover::before {
    opacity: 1;
}

.option-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.option-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.option-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Music Player Styles */
.music-player {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 350px;
    background: var(--bg-surface);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1500;
    overflow: hidden;
}

.music-player-header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    padding: 1rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.music-player-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.music-player-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.music-player-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.music-player-content {
    padding: 1rem;
}

.music-player-content audio {
    width: 100%;
    border-radius: var(--radius-md);
}

/* Video Player Modal Styles */
.video-player-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.video-player-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: 5% auto;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.video-player-header {
    background: var(--bg-surface);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-secondary);
}

.video-title {
    flex: 1;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.video-player-close {
    background: var(--bg-glass);
    border: 1px solid var(--border-secondary);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition-normal);
}

.video-player-close:hover {
    background: var(--bg-glass-hover);
    color: var(--color-primary);
}

.video-player-iframe {
    width: 100%;
    height: 500px;
    border: none;
}

/* Mobile responsive styles for music modals */
@media (max-width: 768px) {
    .music-modal-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .playback-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .music-player {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
    }
    
    .video-player-container {
        width: 95%;
        margin: 2% auto;
    }
    
    .video-player-iframe {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .music-modal-header {
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    
    .music-modal-body {
        padding: 1.5rem;
    }
    
    .playback-option {
        padding: 1.5rem;
    }
    
    .option-icon {
        font-size: 2.5rem;
    }
    
    .video-player-iframe {
        height: 250px;
    }
}

/* Enhanced mobile video controls for better touch experience */
@media (max-width: 768px) {
    #mainVideo {
        -webkit-tap-highlight-color: transparent;
        tap-highlight-color: transparent;
    }
    
    /* Custom play button overlay for mobile */
    .mobile-play-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }
    
    .mobile-play-overlay.show {
        opacity: 1;
        pointer-events: all;
    }
    
    .mobile-play-button {
        width: 80px;
        height: 80px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #000;
        font-size: 2rem;
        cursor: pointer;
        transition: transform 0.3s ease, background 0.3s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .mobile-play-button:hover {
        transform: scale(1.1);
        background: rgba(255, 255, 255, 1);
    }
    
    .mobile-play-button i {
        margin-left: 4px; /* Slight offset to center play icon */
    }
    
    /* Fullscreen button enhancement for mobile */
    .fullscreen-btn {
        position: absolute;
        bottom: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        border: none;
        padding: 10px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 1.2rem;
        z-index: 20;
        transition: background 0.3s ease;
    }
    
    .fullscreen-btn:hover {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* External Streams Styles */
.external-streams-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.external-controls {
    margin-bottom: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.external-stream-item {
    position: relative;
}

.external-stream-item .stream-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.external-stream-item h4 {
    margin: 0;
    flex: 1;
}

.stream-actions {
    display: flex;
    gap: 0.3rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.external-stream-item:hover .stream-actions {
    opacity: 1;
}

.btn-icon {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.stream-description {
    font-size: 0.8rem;
    color: #bbb;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.stream-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    margin-bottom: 0.3rem;
}

.category {
    color: #4a90e2;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stream-type {
    background: rgba(74, 144, 226, 0.2);
    color: #4a90e2;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 600;
}

.last-played {
    font-size: 0.6rem;
    color: #666;
    font-style: italic;
}

/* Modal enhancements for external streams */
.help-text {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 0.3rem;
    display: block;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.test-result {
    margin: 1rem 0;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.test-success {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.test-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.test-error {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.test-result i {
    margin-right: 0.5rem;
}

/* Notification styles */
.notification {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification {
    animation: slideInRight 0.3s ease;
}

/* Form select styling */
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.3);
}

.form-group select option {
    background: #2a5298;
    color: #fff;
}

/* Enhanced stream item hover effects */
.external-stream-item {
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.external-stream-item:hover {
    border-left-color: rgba(74, 144, 226, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.external-stream-item.active {
    border-left-color: #4a90e2;
    background: rgba(74, 144, 226, 0.3);
}

.default-indicator {
    font-size: 0.8em;
    opacity: 0.7;
    margin-left: 0.3rem;
}

.external-stream-item h4 {
    display: flex;
    align-items: center;
}

/* Responsive adjustments for external streams */
@media (max-width: 768px) {
    .stream-actions {
        opacity: 1;
    }
    
    .stream-actions .btn {
        min-width: 40px;
        min-height: 40px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .stream-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .external-stream-item,
    .stream-item {
        padding: 1rem;
        margin-bottom: 0.5rem;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .external-stream-item .stream-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stream-actions {
        margin-top: 0.5rem;
    }
}

/* Dark scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(74, 144, 226, 0.7);
    border-radius: 4px;
}
:::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 144, 226, 0.9);
}

/* External streams occupy whole space globally (all devices) */
.sidebar-section:first-child {
    flex: 1 1 auto !important;
}

.sidebar-section:not(:first-child) {
    display: none !important;
}

/* Custom scrollbars for channel sections on desktop */
.external-streams-list::-webkit-scrollbar,
.stream-list::-webkit-scrollbar,
#externalStreamsList::-webkit-scrollbar,
#regularStreamsSection::-webkit-scrollbar {
    width: 6px;
}

.external-streams-list::-webkit-scrollbar-track,
.stream-list::-webkit-scrollbar-track,
#externalStreamsList::-webkit-scrollbar-track,
#regularStreamsSection::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.external-streams-list::-webkit-scrollbar-thumb,
.stream-list::-webkit-scrollbar-thumb,
#externalStreamsList::-webkit-scrollbar-thumb,
#regularStreamsSection::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.6);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.external-streams-list::-webkit-scrollbar-thumb:hover,
.stream-list::-webkit-scrollbar-thumb:hover,
#externalStreamsList::-webkit-scrollbar-thumb:hover,
#regularStreamsSection::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.8);
}

/* Desktop-specific independent scrolling - only apply on larger screens */
@media (min-width: 1025px) {
    .sidebar-right {
        height: calc(100vh - 140px) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .sidebar-section {
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Give external streams section the whole space */
    .sidebar-section:first-child {
        flex: 1 1 auto !important; /* Takes all available space */
    }
    
    .sidebar-section:not(:first-child) {
        flex: 0 0 auto !important; /* Minimal space, only for content that exists */
        display: none !important; /* Hide other sections to give external streams full space */
    }
    
    .section-header,
    .sidebar-section h3 {
        flex-shrink: 0 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .external-streams-list,
    .stream-list,
    #externalStreamsList,
    #regularStreamsSection {
        height: 100% !important;
        overflow-y: auto !important;
        flex-grow: 1 !important;
        min-height: 0 !important;
        /* Enhanced smooth scrolling for desktop */
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-padding-top: 1rem !important;
    }
    
    /* Ensure search container doesn't interfere */
    .search-container {
        flex-shrink: 0 !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* Enhanced smooth scrolling for desktop */
    .sidebar-right {
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Smooth scroll padding for better UX */
    .external-stream-item,
    .stream-item {
        scroll-margin-top: 1rem !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    }
    
/* Smooth hover transitions */
.external-stream-item:hover,
.stream-item:hover {
    transform: translateX(4px) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2) !important;
}

/* Enhanced Channel Description Styles */
.channel-description,
.livetv-description,
.match-description {
    padding: 0;
    line-height: 1.6;
}

.channel-description h4,
.livetv-description h4,
.match-description h4 {
    color: var(--color-primary-light);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.channel-features,
.livetv-features,
.match-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.feature-item i {
    color: var(--color-primary-light);
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
}

.custom-description {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--color-accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-primary);
}

/* Sports Match Specific Styles */
.match-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(34, 197, 94, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(34, 197, 94, 0.1);
}

.team-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.team-logo-desc {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
}

.vs-separator {
    font-weight: bold;
    color: var(--color-accent);
    margin: 0 1rem;
}

.team-score {
    background: var(--color-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: bold;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.live {
    background: #ef4444;
    color: white;
}

.status-badge.upcoming {
    background: #f59e0b;
    color: white;
}

.status-badge.finished {
    background: #6b7280;
    color: white;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .channel-features,
    .livetv-features,
    .match-features {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .match-info {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .team-info {
        justify-content: center;
    }
    
    .vs-separator {
        margin: 0;
    }
}
}

/* ===== YouTube Player Integration Styles ===== */
#youtube-player-main {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    min-height: 400px; /* Ensure minimum height for video */
}

/* YouTube player iframe styling */
#youtube-player-main iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius-md);
}

/* YouTube indicator badge - HIDDEN */
.youtube-badge {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.youtube-badge::before {
    display: none !important;
    content: none !important;
}

/* Simple YouTube Player - Enhanced Visibility */
#simple-youtube-player {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 15 !important;
    background: #000 !important;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 400px;
    min-width: 300px;
}

#simple-youtube-player iframe {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border: none !important;
    border-radius: var(--radius-md);
    background: #000;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

/* Featured Movies Section Styling */
.featured-movies-section {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.featured-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.featured-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

.view-all-btn {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all-btn:hover {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.featured-movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
    flex: 1;
}

.featured-movie-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 1px solid var(--border-secondary);
    position: relative;
}

.featured-movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--color-primary);
}

.movie-poster {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.featured-movie-card:hover .movie-poster img {
    transform: scale(1.1);
}

.quality-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.quality-badge.hd {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.quality-badge.4k {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

.featured-movie-card:hover .play-overlay {
    opacity: 1;
}

.play-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 1.5rem;
    transition: var(--transition-normal);
}

.play-btn:hover {
    background: white;
    transform: scale(1.1);
}

.movie-info {
    padding: 1.5rem;
}

.movie-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.movie-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.movie-meta .year {
    font-weight: 500;
}

.movie-meta .rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--color-accent);
    font-weight: 600;
}

/* Mobile Featured Movies */
@media (max-width: 768px) {
    .featured-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .featured-title h2 {
        font-size: 1.75rem;
    }
    
    .featured-movies-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .movie-info {
        padding: 1rem;
    }
    
    .movie-title {
        font-size: 1.1rem;
}}
}

/* Movies Section Styling */
.movies-container {
    width: 100%;
    min-height: calc(100vh - 200px);
    padding: 2rem;
    box-sizing: border-box;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    width: 100%;
    margin: 0 auto;
}

.movie-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 1px solid var(--border-secondary);
    position: relative;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--color-primary);
}

.movie-poster-img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    transition: var(--transition-normal);
}

.movie-card:hover .movie-poster-img {
    transform: scale(1.05);
}

/* Footer Styling */
.site-footer {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-secondary);
    margin-top: 4rem;
    padding: 3rem 0 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-section {
    text-align: center;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-logo h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.footer-logo-img {
    height: 40px;
    width: auto;
}

.footer-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--bg-glass);
    border: 1px solid var(--border-secondary);
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition-normal);
}

.social-link:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.footer-bottom {
    border-top: 1px solid var(--border-secondary);
    padding-top: 2rem;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-tech {
    font-weight: 600;
    color: var(--color-accent);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-secondary);
    display: none;
    padding: 0.75rem 0;
    z-index: 1000;
}

.mobile-bottom-nav .nav-item {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    text-align: center;
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.mobile-bottom-nav .nav-item.active {
    color: var(--color-primary);
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
    
    body {
        padding-bottom: 80px;
    }
    
    .site-footer {
        margin-bottom: 80px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Tab Navigation Styling */
.tab-navigation {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
    overflow: hidden;
}

.tab-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border-secondary);
    color: var(--text-secondary);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glass);
    color: var(--text-primary);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-color: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.tab-btn i {
    font-size: 0.6rem;
}

/* Ensure tab button text is visible by default */
.tab-btn span {
    display: inline;
}

/* Tab Content */
.tab-content {
    display: none;
    width: 100%;
    min-height: calc(100vh - 140px);
}

.tab-content.active {
    display: block;
}

/* Loading States */
.movies-loading,
.no-movies {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    color: var(--text-muted);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-secondary);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.no-movies i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-movies h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Movie Counter */
.movie-counter {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.movie-counter i {
    color: var(--color-accent);
}

@media (max-width: 768px) {
    .movie-counter {
        bottom: 100px;
        right: 1rem;
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    .tab-navigation {
        gap: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.7rem;
        font-size: 0.7rem;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
        border-radius: 50%;
    }
    
    .tab-btn span {
        display: none !important;
    }
    
    .tab-btn i {
        font-size: 1.2rem;
        margin: 0;
    }
}

/* Enhanced External Stream Thumbnails */
.stream-thumbnail {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(148, 163, 184, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Stream logos */
.stream-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
    padding: 2px;
}

/* Enhanced Stream Logo Placeholder */
.stream-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.15) 100%);
    color: #60a5fa;
    font-size: 1.4rem;
    position: relative;
    overflow: hidden;
}

.stream-logo-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* Enhanced Live TV Logo */
.live-tv-logo {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #f87171 100%);
    color: white;
    animation: liveTV-pulse 1.5s infinite;
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.4);
    position: relative;
}

.live-tv-logo::after {
    content: 'LIVE';
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #dc2626;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 3px;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes liveTV-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* Sports Matches Section */
.sports-matches-section {
    margin-bottom: 1.5rem;
}

.matches-header {
    margin-bottom: 1rem;
}

.matches-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 0;
}

.matches-title i {
    color: #2ff58b;
    margin-right: 0.5rem;
}

.more-link {
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.more-link:hover {
    color: var(--color-primary-light);
}

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.match-item {
    background: linear-gradient(135deg, rgba(31, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.match-item:hover {
    background: linear-gradient(135deg, rgba(31, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.match-item.upcoming {
    border-left: 4px solid #f59e0b;
}

.match-item.live {
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(15, 23, 42, 0.8));
}

.match-item.live::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), transparent);
    pointer-events: none;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.match-time {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.match-status {
    background: rgba(31, 41, 59, 0.8);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-status.upcoming {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.match-status.live {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.teams-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.team {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.team-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 0.75rem;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.team-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-score {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 1rem;
    min-width: 20px;
    text-align: center;
}

.vs-separator {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .match-item {
        padding: 0.75rem;
    }
    
    .team-logo {
        width: 28px;
        height: 28px;
        margin-right: 0.5rem;
    }
    
    .team-name {
        font-size: 0.8rem;
    }
    
    .team-score {
        font-size: 1.1rem;
        margin: 0 0.75rem;
    }
    
    .vs-separator {
        margin: 0 0.75rem;
    }
}

.stream-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.stream-thumbnail i {
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* Enhanced External Stream Item Layout */
.external-stream-item {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(51, 65, 85, 0.9) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Different backgrounds for different stream types */
.external-stream-item.youtube-stream {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(239, 68, 68, 0.1) 50%, rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(220, 38, 38, 0.3);
}

.external-stream-item.regular-stream {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(59, 130, 246, 0.1) 50%, rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(34, 197, 94, 0.3);
}

.external-stream-item.ai-sports-stream {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(251, 191, 36, 0.1) 50%, rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

/* Enhanced accent stripe */
.external-stream-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    transform: scaleY(0);
    transform-origin: top;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 8px 8px 0;
}

/* Stream type specific accent stripes */
.external-stream-item.youtube-stream::before {
    background: linear-gradient(180deg, #dc2626 0%, #ef4444 50%, #f87171 100%);
}

.external-stream-item.regular-stream::before {
    background: linear-gradient(180deg, #059669 0%, #10b981 50%, #34d399 100%);
}

.external-stream-item.ai-sports-stream::before {
    background: linear-gradient(180deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
}

/* Enhanced hover effects */
.external-stream-item:hover::before {
    transform: scaleY(1);
}

.external-stream-item:hover {
    transform: translateX(6px) translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(148, 163, 184, 0.4);
}

.external-stream-item.youtube-stream:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.25) 0%, rgba(239, 68, 68, 0.15) 50%, rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(220, 38, 38, 0.5);
}

.external-stream-item.regular-stream:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(59, 130, 246, 0.15) 50%, rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(34, 197, 94, 0.5);
}

.external-stream-item.ai-sports-stream:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(251, 191, 36, 0.15) 50%, rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(245, 158, 11, 0.5);
}

.external-stream-item:hover .stream-thumbnail img {
    transform: scale(1.08) rotate(1deg);
    filter: brightness(1.1) saturate(1.2);
}

/* Enhanced active state */
.external-stream-item.active {
    transform: translateX(8px) translateY(-3px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.15) 50%, rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(99, 102, 241, 0.6);
}

.external-stream-item.active::before {
    transform: scaleY(1);
    background: linear-gradient(180deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    width: 6px;
}

/* Stream info layout */
.stream-info {
    flex: 1;
    min-width: 0; /* Prevent text overflow */
}

/* Enhanced Stream Info Text */
.stream-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.375rem 0;
    color: #f1f5f9;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.stream-description {
    font-size: 0.8rem;
    color: #cbd5e1;
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 2.8em;
    opacity: 0.9;
}

.stream-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0;
}

/* Enhanced Stream Category Badge */
.stream-category {
    font-size: 0.7rem;
    color: #fbbf24;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(251, 191, 36, 0.1) 100%);
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stream-viewers {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stream-viewers i {
    font-size: 0.7rem;
}

/* Stream actions */
.stream-actions {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
    opacity: 0;
    transition: var(--transition-fast);
}

.external-stream-item:hover .stream-actions {
    opacity: 1;
}

/* Enhanced Stream Action Buttons */
.stream-actions .btn {
    padding: 0.375rem;
    min-width: 32px;
    height: 32px;
    font-size: 0.8rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.stream-actions .btn:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 0.5);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* URL type indicator */
.url-type-indicator {
    position: absolute;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* YouTube stream status */
.stream-status-youtube {
    background: linear-gradient(135deg, #FF0000, #CC0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* Video error state */
.video-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}

.video-error i {
    filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.5));
}

.video-error h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.video-error p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Play prompt styling */
.play-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    text-align: center;
}

.play-prompt h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.025em;
}

.play-prompt p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
}

/* No streams message enhancements */
.no-streams small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.8;
}

/* ==================== TAB NAVIGATION ==================== */
.tab-navigation {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tab-btn.active {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    color: white;
    border-color: #4CAF50;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.tab-btn i {
    font-size: 1.1rem;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: calc(100vh - 160px);
}

/* Base Streaming Layout - Enhanced by Universal System */
.streaming-layout {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

/* Ensure all sidebar sections are visible on desktop */
.sidebar-left,
.sidebar-right {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.sidebar-left {
    order: 1;
    flex: 0 0 clamp(250px, 22vw, 350px);
    max-height: calc(100vh - clamp(80px, 8vh, 120px));
    overflow-y: auto;
}

.main-player {
    order: 2;
    flex: 1;
    min-width: 0; /* Allows flex item to shrink */
    overflow: hidden;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ==================== FEATURED MOVIES SECTION ==================== */
.featured-movies-section {
    background: transparent;
    border-radius: 0;
}

.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.featured-title h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.featured-title h2 i {
    color: #fbbf24;
    font-size: 1.5rem;
}

.featured-title p {
    color: #94a3b8;
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
}

.view-all-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2);
}

/* Featured Movies Grid */
.featured-movies-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 columns on desktop */
    gap: 1rem;
    padding: 0;
    width: 100%;
    margin: 0;
}

.featured-movie-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(148, 163, 184, 0.1);
    position: relative;
}

.featured-movie-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.movie-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

.quality-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2;
}

.quality-badge.hd {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.9) 0%, rgba(22, 163, 74, 0.9) 100%);
    color: white;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.quality-badge.4k {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%);
    color: white;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.featured-movie-card:hover .play-overlay {
    opacity: 1;
}

.play-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(99, 102, 241, 0.9) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.4);
}

.play-btn i {
    margin-left: 2px; /* Optical alignment for play icon */
}

.movie-info {
    padding: 1.25rem;
}

.movie-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.movie-meta .year {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
}

.movie-meta .rating {
    color: #fbbf24;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.movie-meta .rating i {
    font-size: 0.75rem;
}

/* Back to movies button */
.back-to-movies-btn {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1) 0%, rgba(75, 85, 99, 0.1) 100%);
    border: 1px solid rgba(107, 114, 128, 0.3);
    color: #9ca3af;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.back-to-movies-btn:hover {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.2) 0%, rgba(75, 85, 99, 0.2) 100%);
    color: #d1d5db;
    transform: translateX(-2px);
}

/* ==================== STREAM NOTIFICATION SYSTEM ==================== */
@keyframes slideInNotification {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutNotification {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.stream-notification {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stream-notification .notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stream-notification i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Mobile notification adjustments */
@media (max-width: 768px) {
    .stream-notification {
        position: fixed !important;
        top: 10px !important;
        left: 10px !important;
        right: 10px !important;
        max-width: calc(100vw - 20px) !important;
        font-size: 0.85rem !important;
    }
}

.sidebar-right {
    order: 3;
}

/* ==================== UNIVERSAL RESPONSIVE DESIGN ==================== */

/* Optimized Fluid Layout System - Auto Height */
.streaming-layout {
    gap: clamp(0.5rem, 1.5vw, 1.5rem);
    height: auto;
    min-height: calc(100vh - clamp(80px, 8vh, 120px));
}

/* Optimized Sidebar Scaling - Auto Height */
.sidebar-right {
    flex: 0 0 clamp(250px, 22vw, 350px);
    min-height: calc(100vh - clamp(100px, 10vh, 140px));
    max-height: none;
    overflow-y: auto;
    height: auto;
}

.sidebar-left {
    flex: 0 0 clamp(250px, 22vw, 350px);
    max-height: calc(100vh - clamp(100px, 10vh, 140px));
    overflow-y: auto;
}

/* Universal Typography Scaling */
.video-info h2 {
    font-size: clamp(1.1rem, 2.2vw, 1.8rem);
}

.sidebar-section h3 {
    font-size: clamp(0.95rem, 1.3vw, 1.25rem);
}

.stream-meta {
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    gap: clamp(0.5rem, 1vw, 1rem);
}

/* Optimized Video Container Scaling */
.video-container {
    min-height: clamp(300px, 40vh, 450px);
    max-height: clamp(450px, 60vh, 600px);
    height: auto;
    aspect-ratio: 16 / 9;
}

/* Universal Padding System - Balanced Padding for Three-Column Layout */
main {
    padding: clamp(0.5rem, 1.5vw, 1.5rem);
}

/* ==================== MINIMAL RESPONSIVE BREAKPOINTS ==================== */

/* Desktop - Force 5 columns on all desktop screens */
@media (min-width: 1025px) {
    .movies-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 1rem !important;
    }
}

/* Large Desktop - 5 columns with larger gaps */
@media (min-width: 1400px) {
    .featured-movies-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.5rem;
    }
    
    .movies-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 1.5rem !important;
    }
}

/* FORCE DESKTOP LAYOUT - MAXIMUM PRIORITY */
@media screen and (min-width: 1025px) {
    /* Force main streaming layout to be horizontal */
    div#streaming-content div.streaming-layout {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        width: 100% !important;
        gap: 1rem !important;
        min-height: calc(100vh - 140px) !important;
    }
    
    /* Left ads sidebar */
    div#streaming-content div.streaming-layout aside.sidebar-left {
        display: flex !important;
        flex: 0 0 280px !important;
        order: 1 !important;
        max-width: 280px !important;
        min-width: 250px !important;
    }
    
    /* Main content area */
    div#streaming-content div.streaming-layout div.main-player {
        display: flex !important;
        flex: 1 1 auto !important;
        order: 2 !important;
        flex-direction: column !important;
    }
    
    /* Right channels sidebar */
    div#streaming-content div.streaming-layout aside.sidebar-right {
        display: flex !important;
        flex: 0 0 350px !important;
        order: 3 !important;
        max-width: 350px !important;
        min-width: 300px !important;
    }
    
    /* Hide video player in middle by default */
    div#streaming-content div.streaming-layout div.main-player #hiddenVideoPlayer {
        display: none !important;
        visibility: hidden !important;
        position: absolute !important;
        top: -9999px !important;
        left: -9999px !important;
    }
    
    /* Force show featured movies */
    div#streaming-content div.streaming-layout div.main-player.featured-movies-section {
        display: flex !important;
        visibility: visible !important;
    }
    
    div#streaming-content div.streaming-layout div.main-player .featured-movies-grid {
        display: grid !important;
        visibility: visible !important;
    }
    
    /* Fallback - ensure right sidebar is always visible */
    aside.sidebar-right {
        display: flex !important;
        visibility: visible !important;
        position: relative !important;
    }
}

/* Additional fallback rule - maximum priority */
@media (min-width: 1025px) {
    .streaming-layout {
        display: flex !important;
        flex-direction: row !important;
    }
    
    .sidebar-right {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        width: 350px !important;
        flex-shrink: 0 !important;
    }
}

/* GLOBAL VIDEO PLAYER HIDE - OVERRIDE ANY JAVASCRIPT */
#hiddenVideoPlayer {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    z-index: -1 !important;
}

/* FORCE SHOW FEATURED MOVIES */
.featured-movies-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.featured-movies-grid {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* FORCE CHANNELS TO RIGHT SIDE - MAXIMUM SPECIFICITY */
@media (min-width: 1025px) {
    /* Force streaming layout to be flex row */
    body main #streaming-content .streaming-layout {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        width: 100% !important;
    }
    
    /* Force left ads to position 1 */
    body main #streaming-content .streaming-layout aside.sidebar.sidebar-left {
        display: flex !important;
        order: 1 !important;
        flex: 0 0 280px !important;
        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
    }
    
    /* Force main content to position 2 */
    body main #streaming-content .streaming-layout .main-player.featured-movies-section {
        display: flex !important;
        order: 2 !important;
        flex: 1 1 auto !important;
        flex-direction: column !important;
    }
    
    /* Force right channels to position 3 - RIGHT SIDE */
    body main #streaming-content .streaming-layout aside.sidebar.sidebar-right {
        display: flex !important;
        order: 3 !important;
        flex: 0 0 350px !important;
        width: 350px !important;
        min-width: 350px !important;
        max-width: 350px !important;
        position: relative !important;
        float: none !important;
        margin-left: auto !important;
    }
}

/* Tablet and below - Stack layout */
@media (max-width: 1024px) {
    .streaming-layout {
        flex-direction: column;
        height: auto;
        gap: 1rem;
    }
    
    .sidebar-left {
        order: 1;
        width: 100%;
        max-height: clamp(200px, 25vh, 300px);
        overflow-y: auto;
    }
    
    .main-player {
        order: 2;
        height: auto;
        width: 100%;
        flex: none;
        padding: 1rem;
    }
    
    .featured-movies-section {
        width: 100%;
        display: block;
    }
    
    .featured-movies-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr); /* 3 columns on tablet */
        width: 100%;
    }
    
    /* .movies-grid rule moved to specific breakpoints below */
    
    .sidebar-right {
        order: 3;
        width: 100%;
        max-height: clamp(250px, 35vh, 400px);
        flex: none;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .sidebar-right {
        min-height: calc(100vh - 160px);
        max-height: none;
        height: auto;
    }
    
    /* Featured Movies Mobile Responsive - Force Visibility */
    .featured-movies-section {
        display: block !important;
        width: 100% !important;
        overflow: visible;
    }
    
    .featured-movies-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 1rem;
        width: 100%;
        overflow: visible;
    }
    
    /* Mobile Video Player Fixes */
    #hiddenVideoPlayer {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        background: var(--bg-primary);
    }
    
    #hiddenVideoPlayer .video-container {
        margin: 0.5rem;
        border-radius: var(--radius-md);
        width: calc(100% - 1rem);
        height: clamp(200px, 35vh, 280px);
        background: #000;
    }
    
    #hiddenVideoPlayer #mainVideo {
        height: 100% !important;
        width: 100% !important;
        object-fit: contain;
        border-radius: var(--radius-md);
    }
    
    #hiddenVideoPlayer .video-info {
        padding: 1rem;
        background: var(--bg-primary);
        display: block !important;
        width: 100%;
        box-sizing: border-box;
    }
    
    #hiddenVideoPlayer .video-info h2 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
    }
    
    #hiddenVideoPlayer .stream-meta {
        display: flex;
        gap: 1rem;
        font-size: 0.85rem;
        flex-wrap: wrap;
    }
    
    .back-to-movies-btn {
        margin-top: 0.75rem;
        width: fit-content;
        display: inline-flex !important;
    }
    
    .featured-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
        width: 100%;
    }
    
    .featured-title h2 {
        font-size: 1.4rem;
    }
    
    .featured-title p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .view-all-btn {
        align-self: stretch;
        justify-content: center;
        padding: 1rem 1.5rem;
    }
    
    .movie-poster {
        aspect-ratio: 2/3;
    }
    
    .movie-title {
        font-size: 0.9rem;
    }
    
    .play-btn {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
    
    .quality-badge {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .main-player {
        padding: 0.75rem;
    }
    
    .featured-movies-section {
        display: block !important;
        width: 100% !important;
    }
    
    .featured-movies-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 0.75rem;
        width: 100%;
    }
    
    .featured-header {
        margin-bottom: 1rem;
        gap: 0.75rem;
    }
    
    .featured-title h2 {
        font-size: 1.2rem;
    }
    
    .featured-title p {
        font-size: 0.85rem;
        display: none; /* Hide description on very small screens */
    }
    
    .view-all-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .movie-info {
        padding: 0.75rem;
    }
    
    .movie-title {
        font-size: 0.8rem;
        line-height: 1.2;
    }
    
    .movie-meta .year,
    .movie-meta .rating {
        font-size: 0.75rem;
    }
    
    .featured-movie-card {
        border-radius: 8px;
    }
    
    .movie-poster {
        aspect-ratio: 2/3;
    }
    
    /* Mobile Video Player Fixes for Small Screens */
    #hiddenVideoPlayer {
        width: 100% !important;
        padding: 0 !important;
    }
    
    #hiddenVideoPlayer .video-container {
        margin: 0.25rem;
        width: calc(100% - 0.5rem);
        height: clamp(180px, 30vh, 220px);
        border-radius: var(--radius-sm);
    }
    
    #hiddenVideoPlayer #mainVideo {
        height: 100% !important;
        width: 100% !important;
        border-radius: var(--radius-sm);
    }
    
    #hiddenVideoPlayer .video-info {
        padding: 0.75rem;
        margin: 0;
    }
    
    #hiddenVideoPlayer .video-info h2 {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    #hiddenVideoPlayer .stream-meta {
        font-size: 0.8rem;
        gap: 0.75rem;
    }
    
    .back-to-movies-btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.875rem;
        margin-top: 0.5rem;
    }
}

/* ==================== MOVIES PAGE ==================== */
.movies-header {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8)), url('../Banner/Banner.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 80px; /* Height of main header */
    z-index: 99;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.movies-hero {
    text-align: center;
    padding: 3rem 0 2rem;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(46, 125, 50, 0.1));
}

.hero-content h1 {
    font-size: 3rem;
    margin: 0;
    background: linear-gradient(135deg, #4CAF50, #81C784);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin: 1rem 0 0;
}

/* Movies Controls */
.movies-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0;
}

.movies-search-container {
    flex: 0 0 auto;
    max-width: 400px;
    min-width: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.movies-search-container.expanded {
    flex: 1 1 auto;
    min-width: 250px;
}

.movies-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    z-index: 5;
}

.movies-search-wrapper.expanded {
    width: 100%;
    cursor: text;
    border-color: #4CAF50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
}

.movies-search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 2.5rem;
    border: none;
    border-radius: 25px;
    background: transparent;
    color: white;
    font-size: 1rem;
    outline: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.movies-search-wrapper.expanded .movies-search-input {
    opacity: 1;
    pointer-events: all;
}

.movies-search-wrapper .search-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.movies-search-wrapper.expanded .search-icon {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.movies-search-wrapper .clear-search-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(239, 68, 68, 0.8);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3;
}

.movies-search-wrapper.expanded .clear-search-btn {
    opacity: 1;
}

.movies-search-wrapper .clear-search-btn:hover {
    background: rgba(239, 68, 68, 1);
    transform: translateY(-50%) scale(1.1);
}

/* Filter Buttons */
.movies-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.filter-btn.active {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    color: white;
    border-color: #4CAF50;
}

/* Dropdown Selects */
.genre-dropdown, .sort-dropdown {
    position: relative;
}

.genre-dropdown select, .sort-dropdown select {
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: white;
    cursor: pointer;
    min-width: 140px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.genre-dropdown select:focus, .sort-dropdown select:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Movies Container */
.movies-container {
    padding: 0 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* View Toggle Buttons */
.view-toggle-buttons {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.view-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    font-size: 1rem;
}

.view-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
}

.view-btn.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Movies Grid */
.movies-grid {
    display: grid;
    gap: 1rem;
    padding: 0;
    width: 100%;
    margin: 0;
    margin-bottom: 3rem;
    transition: all 0.3s ease;
}

/* Tiles View (default) - larger cards */
.movies-grid.view-tiles {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* Grid View - more compact */
.movies-grid.view-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

/* List View - horizontal layout */
.movies-grid.view-list {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

/* List view movie card styling */
.movies-grid.view-list .movie-card {
    display: flex;
    flex-direction: row;
    height: 120px;
    align-items: stretch;
}

.movies-grid.view-list .movie-poster {
    width: 80px;
    aspect-ratio: 2/3;
    flex-shrink: 0;
}

.movies-grid.view-list .movie-info {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.movies-grid.view-list .movie-title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    -webkit-line-clamp: 1;
}

.movies-grid.view-list .movie-meta {
    margin-bottom: 0.25rem;
}

.movies-grid.view-list .movie-genre {
    font-size: 0.85rem;
}

/* Mini List View - compact horizontal layout similar to live streaming */
.movies-grid.view-mini {
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

.movies-grid.view-mini .movie-card {
    display: flex;
    flex-direction: row;
    height: 80px;
    align-items: center;
    padding: 0.6rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.movies-grid.view-mini .movie-card:hover {
    background: var(--bg-glass-hover);
    transform: translateX(4px);
    border-color: var(--border-glass);
    box-shadow: var(--shadow-md);
}

.movies-grid.view-mini .movie-poster {
    width: 50px;
    height: 60px;
    aspect-ratio: 2/3;
    flex-shrink: 0;
    margin-right: 0.8rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border-secondary);
}

.movies-grid.view-mini .movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movies-grid.view-mini .movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

.movies-grid.view-mini .movie-info {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.movies-grid.view-mini .movie-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.2rem 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-line-clamp: 1;
}

.movies-grid.view-mini .movie-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.movies-grid.view-mini .movie-year {
    color: var(--text-secondary);
}

.movies-grid.view-mini .movie-rating {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--color-accent);
    font-weight: 500;
}

.movies-grid.view-mini .movie-genre {
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary-light);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: auto;
    text-transform: capitalize;
    white-space: nowrap;
}

.movies-grid.view-mini .movie-quality {
    position: relative;
    top: auto;
    right: auto;
    margin-left: 0.5rem;
    font-size: 0.65rem;
    padding: 0.1rem 0.3rem;
}

/* Tablet - 3 columns */
@media (min-width: 769px) and (max-width: 1024px) {
    .movies-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem;
    }
}

/* Desktop and larger screens - Force 5 columns */
@media (min-width: 1025px) {
    .movies-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 1rem;
    }
}

/* Movie Card */
.movie-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.movie-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.movie-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

.movie-quality {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(76, 175, 80, 0.9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.movie-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.movie-card:hover .movie-play-overlay {
    opacity: 1;
}

.movie-play-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(99, 102, 241, 0.9) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
    cursor: pointer;
}

.movie-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.4);
}

.movie-play-btn i {
    margin-left: 2px; /* Optical alignment for play icon */
}

.movie-info {
    padding: 1rem;
}

.movie-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: white;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.movie-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.movie-rating i {
    color: #FFD700;
    font-size: 0.7rem;
}

.movie-genre {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* Movies Loading */
.movies-loading {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.movies-loading .loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(76, 175, 80, 0.3);
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* No Movies */
.no-movies {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.no-movies i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: rgba(76, 175, 80, 0.3);
}

.no-movies h3 {
    margin: 1rem 0 0.5rem;
    color: white;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    padding: 2rem;
}

.load-more-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 25px;
}

/* ==================== MOVIE MODAL ==================== */
.movie-modal {
    z-index: 10000;
}

.movie-modal-content {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-radius: 15px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Add overlay to ensure text readability over background image */
.movie-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.85) 0%, 
        rgba(45, 45, 45, 0.9) 50%, 
        rgba(26, 26, 26, 0.95) 100%);
    border-radius: 15px;
    z-index: 1;
}

/* Ensure modal content appears above the overlay */
.movie-modal-body {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    padding: 2rem;
}

.movie-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.movie-modal-close:hover {
    background: rgba(255, 0, 0, 0.7);
    transform: scale(1.1);
}

.movie-poster-section {
    text-align: center;
}

.movie-poster-large {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.movie-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.movie-actions .btn {
    border-radius: 25px;
    padding: 0.75rem 1rem;
}

.movie-info-section h1 {
    margin: 0 0 0.75rem;
    color: white;
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
}

.movie-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.movie-meta span {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
}

.movie-genres {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.genre-tag {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.movie-description {
    margin-bottom: 1.5rem;
}

.movie-description h3 {
    color: white;
    margin: 0 0 0.5rem;
}

.movie-description p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.movie-cast {
    margin-bottom: 1.5rem;
}

.movie-cast h3 {
    color: white;
    margin: 0 0 0.75rem;
}

.cast-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cast-member {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.movie-details {
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    margin-bottom: 0.5rem;
    align-items: center;
}

.detail-label {
    font-weight: 600;
    color: white;
    min-width: 120px;
}

.detail-value {
    color: var(--text-muted);
}

.similar-movies-section {
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.similar-movies-section h3 {
    color: white;
    margin: 0 0 1rem;
}

.similar-movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.similar-movie-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.similar-movie-card:hover {
    transform: translateY(-4px);
}

.similar-movie-card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.similar-movie-card .movie-title {
    font-size: 0.8rem;
    text-align: center;
    line-height: 1.2;
}

/* ==================== RESPONSIVE DESIGN ====================
@media (max-width: 768px) {
    .movies-header {
        top: 70px; /* Adjust for smaller mobile header */
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
    
    .tab-navigation {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 0.7rem;
        font-size: 0.9rem;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
        border-radius: 50%;
    }
    
    /* Hide text only on mobile (768px and below) */
    .tab-btn span {
        display: none !important;
    }
    
    .tab-btn i {
        font-size: 1.2rem;
        margin: 0;
    }
    
    /* Mobile movies search styles */
    .movies-search-container {
        flex: 0 0 auto;
        min-width: 48px;
        order: -1; /* Put search first on mobile */
    }
    
    .movies-search-container.expanded {
        flex: 1 1 auto;
        min-width: 200px;
    }
    
    .movies-search-wrapper {
        width: 48px;
        height: 48px;
        border-radius: 24px;
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
    
    .movies-search-wrapper.expanded {
        width: 100%;
        border-color: #4CAF50;
        box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
    }
    
    .movies-search-wrapper .search-icon {
        font-size: 1.3rem;
        width: 32px;
        height: 32px;
    }
    
    .movies-search-wrapper .clear-search-btn {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
        right: 0.8rem;
    }
    
    /* Make search more touch-friendly on mobile */
    .movies-search-wrapper:not(.expanded) {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(76, 175, 80, 0.3);
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .movies-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .movies-filters {
        justify-content: center;
    }
    
    .filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .movies-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 columns on mobile only */
        gap: 1rem;
    }
    
    /* Regular mobile movies grid adjustments (Movies tab) */
    .movies-container {
        padding: 0 !important; /* Remove side padding for edge-to-edge layout */
    }
    
    .movies-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 columns on mobile */
        gap: 0.5rem !important;
        padding: 0.5rem !important; /* Add minimal padding inside grid */
        margin: 0 !important;
    }
    
    /* Force mini-list layout only for Music tab (movies2-content) */
    #movies2-content .movies-grid,
    #movies2-content .movies-grid.view-tiles,
    #movies2-content .movies-grid.view-grid,
    #movies2-content .movies-grid.view-list,
    #movies2-content .movies-grid.view-mini {
        grid-template-columns: 1fr !important; /* Single column for mini-list */
        gap: 0.5rem !important;
    }
    
    #movies2-content .movies-grid .movie-card,
    #movies2-content .movies-grid.view-tiles .movie-card,
    #movies2-content .movies-grid.view-grid .movie-card,
    #movies2-content .movies-grid.view-list .movie-card,
    #movies2-content .movies-grid.view-mini .movie-card {
        display: flex !important;
        flex-direction: row !important;
        height: 70px !important;
        align-items: center !important;
        padding: 0.5rem !important;
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.08), rgba(59, 130, 246, 0.1)) !important;
        border: 1px solid rgba(99, 102, 241, 0.2) !important;
        border-radius: var(--radius-md) !important;
        transition: var(--transition-normal) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1) !important;
    }
    
    #movies2-content .movies-grid .movie-card:hover,
    #movies2-content .movies-grid.view-tiles .movie-card:hover,
    #movies2-content .movies-grid.view-grid .movie-card:hover,
    #movies2-content .movies-grid.view-list .movie-card:hover,
    #movies2-content .movies-grid.view-mini .movie-card:hover {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.12), rgba(59, 130, 246, 0.15)) !important;
        transform: translateX(4px) scale(1.02) !important;
        border-color: rgba(99, 102, 241, 0.4) !important;
        box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2), 0 0 20px rgba(139, 92, 246, 0.1) !important;
    }
    
    #movies2-content .movies-grid .movie-poster,
    #movies2-content .movies-grid.view-tiles .movie-poster,
    #movies2-content .movies-grid.view-grid .movie-poster,
    #movies2-content .movies-grid.view-list .movie-poster,
    #movies2-content .movies-grid.view-mini .movie-poster {
        width: 45px !important;
        height: 55px !important;
        aspect-ratio: 2/3 !important;
        flex-shrink: 0 !important;
        margin-right: 0.6rem !important;
        border-radius: var(--radius-sm) !important;
        overflow: hidden !important;
        background: var(--bg-surface) !important;
        border: 1px solid var(--border-secondary) !important;
    }
    
    #movies2-content .movies-grid .movie-poster img,
    #movies2-content .movies-grid.view-tiles .movie-poster img,
    #movies2-content .movies-grid.view-grid .movie-poster img,
    #movies2-content .movies-grid.view-list .movie-poster img,
    #movies2-content .movies-grid.view-mini .movie-poster img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        transition: transform 0.3s ease !important;
    }
    
    #movies2-content .movies-grid .movie-info,
    #movies2-content .movies-grid.view-tiles .movie-info,
    #movies2-content .movies-grid.view-grid .movie-info,
    #movies2-content .movies-grid.view-list .movie-info,
    #movies2-content .movies-grid.view-mini .movie-info {
        flex: 1 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        min-width: 0 !important;
    }
    
    #movies2-content .movies-grid .movie-title,
    #movies2-content .movies-grid.view-tiles .movie-title,
    #movies2-content .movies-grid.view-grid .movie-title,
    #movies2-content .movies-grid.view-list .movie-title,
    #movies2-content .movies-grid.view-mini .movie-title {
        font-size: 0.65rem !important;
        font-weight: 500 !important;
        color: var(--text-primary) !important;
        margin: 0 0 0.15rem 0 !important;
        line-height: 1.2 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        -webkit-line-clamp: 1 !important;
    }
    
    #movies2-content .movies-grid .movie-meta,
    #movies2-content .movies-grid.view-tiles .movie-meta,
    #movies2-content .movies-grid.view-grid .movie-meta,
    #movies2-content .movies-grid.view-list .movie-meta,
    #movies2-content .movies-grid.view-mini .movie-meta {
        display: flex !important;
        align-items: center !important;
        gap: 0.3rem !important;
        margin: 0 !important;
        font-size: 0.6rem !important;
        color: var(--text-muted) !important;
    }
    
    #movies2-content .movies-grid .movie-genre,
    #movies2-content .movies-grid.view-tiles .movie-genre,
    #movies2-content .movies-grid.view-grid .movie-genre,
    #movies2-content .movies-grid.view-list .movie-genre,
    #movies2-content .movies-grid.view-mini .movie-genre {
        background: linear-gradient(45deg, rgba(99, 102, 241, 0.8), rgba(139, 92, 246, 0.7)) !important;
        color: white !important;
        padding: 0.06rem 0.25rem !important;
        border-radius: var(--radius-sm) !important;
        font-size: 0.55rem !important;
        font-weight: 500 !important;
        margin-left: auto !important;
        text-transform: capitalize !important;
        white-space: nowrap !important;
        box-shadow: 0 1px 4px rgba(99, 102, 241, 0.3) !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    }
    
    #movies2-content .movies-grid .movie-year,
    #movies2-content .movies-grid.view-tiles .movie-year,
    #movies2-content .movies-grid.view-grid .movie-year,
    #movies2-content .movies-grid.view-list .movie-year,
    #movies2-content .movies-grid.view-mini .movie-year {
        color: var(--text-secondary) !important;
    }
    
    #movies2-content .movies-grid .movie-rating,
    #movies2-content .movies-grid.view-tiles .movie-rating,
    #movies2-content .movies-grid.view-grid .movie-rating,
    #movies2-content .movies-grid.view-list .movie-rating,
    #movies2-content .movies-grid.view-mini .movie-rating {
        display: flex !important;
        align-items: center !important;
        gap: 0.2rem !important;
        color: #fbbf24 !important;
        font-weight: 600 !important;
        text-shadow: 0 1px 2px rgba(251, 191, 36, 0.3) !important;
    }
    
    #movies2-content .movies-grid .movie-rating i,
    #movies2-content .movies-grid.view-tiles .movie-rating i,
    #movies2-content .movies-grid.view-grid .movie-rating i,
    #movies2-content .movies-grid.view-list .movie-rating i,
    #movies2-content .movies-grid.view-mini .movie-rating i {
        color: #f59e0b !important;
        filter: drop-shadow(0 1px 2px rgba(245, 158, 11, 0.4)) !important;
    }
    
    #movies2-content .movies-grid .quality-badge,
    #movies2-content .movies-grid.view-tiles .quality-badge,
    #movies2-content .movies-grid.view-grid .quality-badge,
    #movies2-content .movies-grid.view-list .quality-badge,
    #movies2-content .movies-grid.view-mini .quality-badge {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        margin-left: 0.4rem !important;
        font-size: 0.55rem !important;
        padding: 0.08rem 0.25rem !important;
        background: linear-gradient(45deg, rgba(16, 185, 129, 0.8), rgba(5, 150, 105, 0.9)) !important;
        color: white !important;
        border-radius: 3px !important;
        font-weight: 500 !important;
        box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3) !important;
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2) !important;
    }
    
    /* Music Playback Options Modal */
    .music-modal .music-modal-content {
        max-width: 400px;
        width: 90%;
    }
    
    .music-playback-options {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .playback-option-btn {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1.2rem;
        background: var(--bg-glass);
        border: 1px solid var(--border-secondary);
        border-radius: var(--radius-md);
        cursor: pointer;
        transition: var(--transition-normal);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        text-align: left;
        color: var(--text-primary);
    }
    
    .playback-option-btn:hover {
        background: var(--bg-glass-hover);
        border-color: var(--border-glass);
        transform: translateX(4px);
        box-shadow: var(--shadow-md);
    }
    
    .playback-option-btn.video-option:hover {
        border-color: rgba(59, 130, 246, 0.4);
        box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
    }
    
    .playback-option-btn.audio-option:hover {
        border-color: rgba(139, 92, 246, 0.4);
        box-shadow: 0 4px 16px rgba(139, 92, 246, 0.1);
    }
    
    .option-icon {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .video-option .option-icon {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.2));
        color: #3b82f6;
    }
    
    .audio-option .option-icon {
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(168, 85, 247, 0.2));
        color: #8b5cf6;
    }
    
    .option-icon i {
        font-size: 1.5rem;
    }
    
    .option-content {
        flex: 1;
    }
    
    .option-content h3 {
        margin: 0 0 0.25rem 0;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .option-content p {
        margin: 0;
        font-size: 0.9rem;
        color: var(--text-muted);
        line-height: 1.4;
    }
    
    .option-arrow {
        color: var(--text-muted);
        font-size: 1rem;
        opacity: 0.7;
        transition: var(--transition-fast);
    }
    
    .playback-option-btn:hover .option-arrow {
        opacity: 1;
        transform: translateX(4px);
    }
    
    /* Mobile adjustments for music modal */
    @media (max-width: 768px) {
        .music-modal .music-modal-content {
            width: 95%;
            max-width: 350px;
        }
        
        .playback-option-btn {
            padding: 1rem;
            gap: 0.8rem;
        }
        
        .option-icon {
            width: 40px;
            height: 40px;
        }
        
        .option-icon i {
            font-size: 1.2rem;
        }
        
        .option-content h3 {
            font-size: 1rem;
        }
        
        .option-content p {
            font-size: 0.85rem;
        }
    }
    
    /* Mini Music Player Styles */
    .mini-audio-container {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 300px;
        height: 500px;
        background: linear-gradient(135deg, #2d2464, #1a1a2e);
        border-radius: 20px;
        z-index: 2000;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
        padding: 20px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
        color: #fafafa;
        font-family: 'Roboto', sans-serif;
        user-select: none;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .mini-player-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .mini-header-controls {
        display: flex;
        gap: 8px;
        align-items: center;
    }
    
    .mini-player-header h1 {
        font-size: 1.2rem;
        text-transform: uppercase;
        color: #fafafa;
        margin: 0;
    }
    
    .mini-close-btn {
        background: none;
        border: none;
        color: #fafafa;
        font-size: 1.2rem;
        cursor: pointer;
        padding: 8px;
        border-radius: 50%;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
    }
    
    .mini-close-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: scale(1.1);
    }
    
    .mini-audio-img-wrapper {
        display: flex;
        align-items: center;
        flex-direction: column;
        margin: 20px 0;
    }
    
    .mini-audio-img {
        width: 160px;
        height: 160px;
        border: 6px solid #9664ff;
        padding: 8px;
        border-radius: 50%;
        overflow: hidden;
        margin-bottom: 20px;
    }
    
    .mini-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }
    
    .rotating {
        animation: rotate 10s linear infinite paused;
    }
    
    @keyframes rotate {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }
    
    .mini-audio-title {
        font-size: 1.2rem;
        font-weight: 600;
        color: #fafafa;
        margin: 0 0 8px 0;
        text-align: center;
        text-transform: capitalize;
        max-width: 250px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .mini-audio-singer {
        font-size: 0.9rem;
        font-weight: 400;
        color: #bcbcbc;
        margin: 0;
        text-align: center;
    }
    
    .mini-audio-progress {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 80%;
        margin: 20px 0;
    }
    
    .mini-progress {
        grid-column: 1 / -1;
        margin-bottom: 12px;
        background-color: #3d3a4b;
        height: 6px;
        border-radius: 8px;
        cursor: pointer;
        position: relative;
    }
    
    .mini-progress-head {
        position: absolute;
        background-color: #fafafa;
        height: 16px;
        width: 16px;
        top: 50%;
        left: 0%;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        z-index: 2;
        box-shadow: 0 0 0 4px rgba(150, 100, 255, 0.3);
    }
    
    .mini-progress-bar {
        background: linear-gradient(to right, #425ef0, #7854fb);
        height: 100%;
        width: 0%;
        border-radius: 8px;
        position: relative;
    }
    
    .mini-current-time {
        text-align: left;
        font-size: 0.85rem;
        color: #bcbcbc;
    }
    
    .mini-duration {
        text-align: right;
        font-size: 0.85rem;
        color: #bcbcbc;
    }
    
    .mini-audio-btns {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 200px;
        margin-top: 10px;
    }
    
    .mini-btn {
        cursor: pointer;
        border: none;
        background: none;
        font-size: 1.2rem;
        color: #fafafa;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        padding: 8px;
        border-radius: 50%;
    }
    
    .mini-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: scale(1.1);
    }
    
    .mini-play {
        background: linear-gradient(to right, #425ef0, #7854fb) !important;
        padding: 15px 18px !important;
        font-size: 1.4rem !important;
    }
    
    .mini-play:hover {
        background: linear-gradient(to right, #3b4de0, #6943eb) !important;
        transform: scale(1.05) !important;
    }
    
    .mini-control-buttons {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 200px;
        margin-top: 5px;
    }
    
    .mini-playlist {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 20px;
        z-index: 10;
        padding: 20px;
        overflow-y: auto;
    }
    
    .mini-playlist-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 15px;
    }
    
    .mini-playlist-header h3 {
        color: #fafafa;
        margin: 0;
        font-size: 1.1rem;
        font-weight: 600;
    }
    
    .mini-playlist-items {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .mini-playlist-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .mini-playlist-item:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-1px);
    }
    
    .mini-playlist-item.active {
        background: rgba(150, 100, 255, 0.2);
        border: 1px solid rgba(150, 100, 255, 0.3);
    }
    
    .mini-playlist-item img {
        width: 40px;
        height: 40px;
        border-radius: 6px;
        object-fit: cover;
    }
    
    .track-info {
        flex: 1;
        min-width: 0;
    }
    
    .track-title {
        color: #fafafa;
        font-size: 0.9rem;
        font-weight: 500;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-bottom: 2px;
    }
    
    .track-duration {
        color: #bcbcbc;
        font-size: 0.8rem;
    }
    
    .track-play-btn {
        padding: 6px 8px !important;
        font-size: 0.9rem !important;
        opacity: 0.7;
        transition: opacity 0.3s ease;
    }
    
    .mini-playlist-item:hover .track-play-btn {
        opacity: 1;
    }
    
    /* Mobile adjustments for mini player */
    @media (max-width: 768px) {
        .mini-audio-container {
            width: 280px;
            height: 520px;
        }
        
        .mini-audio-img {
            width: 140px;
            height: 140px;
        }
        
        .mini-audio-title {
            font-size: 1.1rem;
        }
        
        .mini-audio-btns {
            width: 180px;
        }
        
        .mini-control-buttons {
            width: 180px;
        }
        
        .mini-play {
            padding: 12px 15px !important;
        }
        
        .mini-playlist-item {
            padding: 8px;
        }
        
        .mini-playlist-item img {
            width: 35px;
            height: 35px;
        }
        
        .track-title {
            font-size: 0.85rem;
        }
    }
    
    /* Create gradient variety for movie cards */
    .movies-grid .movie-card:nth-child(3n+1) {
        background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(219, 39, 119, 0.08), rgba(190, 24, 93, 0.1)) !important;
        border-color: rgba(236, 72, 153, 0.2) !important;
        box-shadow: 0 2px 8px rgba(236, 72, 153, 0.1) !important;
    }
    
    .movies-grid .movie-card:nth-child(3n+1):hover {
        background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(219, 39, 119, 0.12), rgba(190, 24, 93, 0.15)) !important;
        border-color: rgba(236, 72, 153, 0.4) !important;
        box-shadow: 0 4px 16px rgba(236, 72, 153, 0.2), 0 0 20px rgba(219, 39, 119, 0.1) !important;
    }
    
    .movies-grid .movie-card:nth-child(3n+2) {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(22, 163, 74, 0.08), rgba(21, 128, 61, 0.1)) !important;
        border-color: rgba(34, 197, 94, 0.2) !important;
        box-shadow: 0 2px 8px rgba(34, 197, 94, 0.1) !important;
    }
    
    .movies-grid .movie-card:nth-child(3n+2):hover {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.12), rgba(21, 128, 61, 0.15)) !important;
        border-color: rgba(34, 197, 94, 0.4) !important;
        box-shadow: 0 4px 16px rgba(34, 197, 94, 0.2), 0 0 20px rgba(22, 163, 74, 0.1) !important;
    }
    
    .movies-grid .movie-card:nth-child(5n+4) {
        background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(234, 88, 12, 0.08), rgba(194, 65, 12, 0.1)) !important;
        border-color: rgba(249, 115, 22, 0.2) !important;
        box-shadow: 0 2px 8px rgba(249, 115, 22, 0.1) !important;
    }
    
    .movies-grid .movie-card:nth-child(5n+4):hover {
        background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(234, 88, 12, 0.12), rgba(194, 65, 12, 0.15)) !important;
        border-color: rgba(249, 115, 22, 0.4) !important;
        box-shadow: 0 4px 16px rgba(249, 115, 22, 0.2), 0 0 20px rgba(234, 88, 12, 0.1) !important;
    }
    
    .movies-grid .movie-card:nth-child(7n+5) {
        background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(147, 51, 234, 0.08), rgba(126, 34, 206, 0.1)) !important;
        border-color: rgba(168, 85, 247, 0.2) !important;
        box-shadow: 0 2px 8px rgba(168, 85, 247, 0.1) !important;
    }
    
    .movies-grid .movie-card:nth-child(7n+5):hover {
        background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(147, 51, 234, 0.12), rgba(126, 34, 206, 0.15)) !important;
        border-color: rgba(168, 85, 247, 0.4) !important;
        box-shadow: 0 4px 16px rgba(168, 85, 247, 0.2), 0 0 20px rgba(147, 51, 234, 0.1) !important;
    }
    
    .movie-modal-body {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .movie-poster-section {
        max-width: 250px;
        margin: 0 auto;
    }
    
    .movie-actions {
        flex-direction: row;
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .movie-actions .btn {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .movies-container {
        padding: 1rem;
    }
    
    .movies-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 columns on small mobile */
        gap: 0.75rem;
    }
    
    .movie-poster {
        height: 220px;
    }
    
    .movie-modal-content {
        width: 95%;
    }
    
    .movie-modal-body {
        padding: 1rem;
    }
}

/* Search input styling for YouTube detection */
.search-input-wrapper {
    position: relative;
    width: 100%;
}

/* External stream modal enhancements */
.form-group .help-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    line-height: 1.4;
    opacity: 0.8;
}

/* Responsive YouTube player */
@media (max-width: 768px) {
    #youtube-player-main {
        border-radius: 0;
    }
    
    #youtube-player-main iframe {
        border-radius: 0;
    }
    
    .stream-thumbnail {
        width: 50px;
        height: 38px;
    }
    
    .stream-actions {
        opacity: 1; /* Always show on mobile */
    }
    
    .external-stream-item {
        transform: none;
    }
    
    .external-stream-item:hover {
        transform: none;
    }
    
    .stream-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .youtube-badge {
        display: none !important;
        visibility: hidden !important;
    }
}

@media (max-width: 480px) {
    .external-stream-item {
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .stream-thumbnail {
        width: 45px;
        height: 34px;
    }
    
    .stream-info h4 {
        font-size: 0.9rem;
    }
    
    .stream-description {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
        max-height: 1.3em;
    }
    
    .youtube-badge {
        display: none !important;
        visibility: hidden !important;
    }
}

/* ==================== MOVIE POPUP PLAYER STYLES ==================== */
.movie-popup-player {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.movie-popup-player:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.movie-popup-player.minimized {
    cursor: pointer;
}

.movie-popup-player.minimized:hover {
    background: rgba(0, 0, 0, 0.9);
}

.popup-header button:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.1);
}

.popup-header button:active {
    transform: scale(0.95);
}

/* Mobile responsive popup */
@media (max-width: 768px) {
    .movie-popup-player {
        width: calc(100vw - 20px) !important;
        height: 240px !important;
        top: 80px !important;
        right: 10px !important;
        left: 10px !important;
        min-width: unset !important;
        resize: none;
    }
    
    .movie-popup-player.minimized {
        width: 150px !important;
        height: 40px !important;
        right: 10px !important;
        left: unset !important;
    }
}

@media (max-width: 480px) {
    .movie-popup-player {
        width: calc(100vw - 20px) !important;
        height: 200px !important;
        top: 70px !important;
    }
    
    .popup-header {
        padding: 0 8px !important;
    }
    
    .popup-header span {
        font-size: 0.8rem !important;
        max-width: 120px !important;
    }
    
    .popup-header button {
        width: 20px !important;
        height: 20px !important;
        font-size: 0.7rem !important;
    }
}

/* ==================== FOOTER STYLES ==================== */
.site-footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    border-top: 1px solid var(--border-secondary);
    margin-top: 2rem;
    position: relative;
    z-index: 10;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary-light), transparent);
    opacity: 0.5;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-container:first-child {
    padding: 3rem 2rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
    max-width: 400px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.footer-logo-img {
    height: 80px;
    width: auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.footer-logo h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-glass);
    border: 1px solid var(--border-secondary);
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-normal);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
}

.social-link:hover {
    background: var(--bg-glass-hover);
    color: var(--color-primary-light);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-accent);
    margin: 0 0 1rem 0;
    letter-spacing: -0.025em;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
    padding: 0.25rem 0;
    border-radius: var(--radius-sm);
}

.footer-links a:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

.footer-bottom {
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid var(--border-secondary);
    padding: 1.5rem 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.footer-tech {
    font-size: 0.8rem !important;
    opacity: 0.7;
}

/* Footer responsive design */
@media (max-width: 1024px) {
    .footer-container:first-child {
        padding: 2rem 1rem;
    }
}

@media (max-width: 768px) {
    .site-footer {
        margin-top: 1rem;
    }
    
    .footer-container:first-child {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-container {
        padding: 0 1rem;
    }
    
    .footer-bottom {
        padding: 1rem 0;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .footer-social {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        margin: 0.25rem;
    }
}

@media (max-width: 480px) {
    .footer-logo {
        justify-content: center;
        text-align: center;
    }
    
    .footer-description {
        text-align: center;
        max-width: none;
    }
    
    .footer-links {
        text-align: center;
    }
}

/* ==================== TV-STYLE LOGO OVERLAY ==================== */

.tv-logo-overlay {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 99999 !important;
    pointer-events: none;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    width: auto !important;
    height: auto !important;
}

.tv-logo {
    height: 45px !important;
    width: auto !important;
    max-width: 150px !important;
    filter: drop-shadow(3px 3px 8px rgba(0, 0, 0, 1)) !important;
    background: rgba(0, 0, 0, 0.85) !important;
    border-radius: 10px !important;
    padding: 6px 10px !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    display: block !important;
    visibility: visible !important;
    position: relative !important;
}

/* Text fallback for logo */
.tv-logo-text {
    background: rgba(0, 0, 0, 0.85) !important;
    color: white !important;
    font-family: Impact, Arial Black, sans-serif !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    padding: 8px 12px !important;
    border-radius: 10px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 1) !important;
    display: block !important;
    visibility: visible !important;
}

/* Ensure video container supports logo overlay */
.video-container {
    position: relative !important;
}

#hiddenVideoPlayer {
    position: relative !important;
}

/* Hover effect - make logo more visible when hovering over video */
.video-container:hover .tv-logo-overlay {
    opacity: 1;
}

/* Ensure logo is only visible in video container */
.video-container .tv-logo-overlay {
    display: block !important;
    visibility: visible !important;
    position: absolute !important;
}

/* Logo only appears in video player, not main player */
.tv-logo-overlay {
    display: block !important;
    visibility: visible !important;
}

/* Mobile adjustments for TV logo */
@media (max-width: 768px) {
    .tv-logo-overlay {
        top: 6px;
        right: 6px;
    }
    
    .tv-logo {
        height: 28px;
        max-width: 90px;
        padding: 2px 5px;
        border-radius: 4px;
    }
}

/* Extra small mobile adjustments */
@media (max-width: 480px) {
    .tv-logo-overlay {
        top: 5px;
        right: 5px;
    }
    
    .tv-logo {
        height: 24px;
        max-width: 75px;
        padding: 2px 4px;
    }
}

/* Ensure logo stays visible in fullscreen */
.video-container:fullscreen .tv-logo-overlay,
.video-container:-webkit-full-screen .tv-logo-overlay,
.video-container:-moz-full-screen .tv-logo-overlay {
    position: fixed;
    top: 8px;
    right: 8px;
    z-index: 9999;
}

/* Fullscreen mobile positioning */
@media (max-width: 768px) {
    .video-container:fullscreen .tv-logo-overlay,
    .video-container:-webkit-full-screen .tv-logo-overlay,
    .video-container:-moz-full-screen .tv-logo-overlay {
        top: 6px;
        right: 6px;
    }
}

/* ==================== MOBILE UTILITIES ==================== */
@media (max-width: 768px) {
    /* Improve touch scrolling */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Better touch targets */
    button, .btn, a {
        min-height: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Prevent zoom on input focus */
    input[type="text"], input[type="url"], textarea, select {
        font-size: 16px;
    }
    
    /* Improve modal experience on mobile */
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 2rem auto;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* ===== Channel List Styles ===== */
.channels-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.channel-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.875rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.channel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
    transform: scaleY(0);
    transform-origin: top;
    transition: var(--transition-normal);
}

.channel-item:hover::before {
    transform: scaleY(1);
}

.channel-item:hover {
    background: var(--bg-glass-hover);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-glass);
}

.channel-item.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.3), var(--shadow-md);
}

.channel-item.active::before {
    transform: scaleY(1);
}

/* Channel logo */
.channel-logo {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-secondary);
}

.channel-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.channel-logo i {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.channel-item:hover .channel-logo img {
    transform: scale(1.05);
}

/* Channel info */
.channel-info {
    flex: 1;
    min-width: 0;
}

.channel-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-description {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin: 0 0 0.5rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 2.6em;
}

.channel-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0;
}

.channel-category {
    font-size: 0.75rem;
    color: var(--color-accent);
    font-weight: 500;
    background: rgba(245, 158, 11, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.stream-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.channel-type {
    font-size: 0.65rem;
    color: var(--color-primary-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Channel actions */
.channel-actions {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
    opacity: 0;
    transition: var(--transition-fast);
}

.channel-item:hover .channel-actions {
    opacity: 1;
}

.channel-actions .btn {
    padding: 0.25rem;
    min-width: 28px;
    height: 28px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* No channels message */
.no-channels {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 1rem;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-secondary);
}

.no-channels i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--text-muted);
    opacity: 0.7;
}

.no-channels p {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
}

.no-channels small {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Section header for channels */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    letter-spacing: -0.025em;
}

.channel-actions .btn {
    font-size: 0.9rem;
    padding: 0.5rem;
}

/* Responsive design for channels */
@media (max-width: 768px) {
    .channel-logo {
        width: 45px;
        height: 45px;
    }
    
    .channel-actions {
        opacity: 1; /* Always show on mobile */
    }
    
    .channel-item {
        transform: none;
    }
    
    .channel-item:hover {
        transform: none;
    }
    
    .channel-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .channel-item {
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .channel-logo {
        width: 40px;
        height: 40px;
    }
    
    .channel-info h4 {
        font-size: 0.9rem;
    }
    
    .channel-description {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
        max-height: 1.3em;
    }
}

/* Movie Player Styles */
.movie-player-container {
    position: relative !important;
    width: 100% !important;
    height: 100vh !important;
    background: #000 !important;
    display: flex !important;
    flex-direction: column !important;
    z-index: 10001;
}

.movie-player-container .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: movieSpinner 1s linear infinite;
    margin: 0 auto;
}

@keyframes movieSpinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.movie-player-container button:hover {
    background: rgba(255,255,255,0.3) !important;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.movie-player-container iframe {
    border: none !important;
    background: #000 !important;
}

/* Mobile responsive player */
@media (max-width: 768px) {
    .movie-player-container {
        height: 100vh !important;
        width: 100vw !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 10001 !important;
    }
    
    .movie-player-container iframe {
        width: 100vw !important;
        height: 100vh !important;
    }
}

/* Notification Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ==================== AI SPORTS STREAMS STYLES ==================== */
.ai-sports-stream {
    border-left: 3px solid #f59e0b !important;
    background: rgba(245, 158, 11, 0.05);
}

.ai-sports-stream:hover {
    border-left-color: #d97706 !important;
    background: rgba(245, 158, 11, 0.1) !important;
}

.ai-sports-stream.active {
    border-left-color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.2) !important;
}

.match-thumbnail {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(245, 158, 11, 0.3);
    min-height: 60px;
}

.league-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.league-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    transition: var(--transition-fast);
}

.league-logo:hover {
    transform: scale(1.1);
    border-color: rgba(245, 158, 11, 0.6);
}

.league-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-status-badge {
    font-size: 0.6rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.match-status-badge.live {
    background: rgba(34, 197, 94, 0.9);
    color: white;
    animation: pulse-live 2s infinite;
}

.match-status-badge.finished {
    background: rgba(107, 114, 128, 0.9);
    color: white;
}

.match-status-badge.upcoming {
    background: rgba(59, 130, 246, 0.9);
    color: white;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ai-sports-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: white !important;
    font-size: 0.7rem !important;
    padding: 0.2rem 0.6rem !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.025em !important;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.ai-sports-badge i {
    font-size: 0.8rem;
}

/* AI Sports stream info styling */
.ai-sports-stream .stream-info h4 {
    color: #fbbf24 !important;
    font-weight: 600;
}

.ai-sports-stream .stream-description {
    color: var(--text-secondary) !important;
    font-size: 0.8rem;
}

/* Responsive adjustments for AI Sports streams */
@media (max-width: 768px) {
    .match-thumbnail {
        min-height: 50px;
        padding: 0.4rem;
    }
    
    .league-logo {
        width: 28px;
        height: 28px;
        padding: 2px;
    }
    
    .league-name {
        font-size: 0.6rem;
        max-width: 50px;
    }
    
    .match-status-badge {
        font-size: 0.55rem;
        padding: 0.15rem 0.4rem;
    }
    
    .ai-sports-badge {
        font-size: 0.65rem !important;
        padding: 0.15rem 0.5rem !important;
    }
}

/* Match Item Structure (like in the image) */
.match-item-content {
    width: 100%;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.match-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.match-status {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.match-status.upcoming {
    background: rgba(59, 130, 246, 0.9);
    color: white;
}

.match-status.live {
    background: rgba(34, 197, 94, 0.9);
    color: white;
    animation: pulse-live 2s infinite;
}

.match-status.finished {
    background: rgba(107, 114, 128, 0.9);
    color: white;
}

.teams-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.team.away-team {
    flex-direction: row-reverse;
    text-align: right;
}

.team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.team-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.1;
    max-width: 120px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.match-score {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    margin: 0 0.25rem;
}

.score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

.league-badge {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.league-badge i {
    font-size: 0.75rem;
    color: var(--color-accent);
}

/* Enhanced AI Sports stream styling to match dark theme */
.ai-sports-stream {
    background: rgba(30, 41, 59, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-left: 3px solid #f59e0b !important;
}

.ai-sports-stream:hover {
    background: rgba(30, 41, 59, 1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Mobile responsive adjustments for match structure */
@media (max-width: 768px) {
    .teams-container {
        gap: 0.25rem;
    }
    
    .team-logo {
        width: 20px;
        height: 20px;
    }
    
    .team-name {
        font-size: 0.7rem;
        max-width: 100px;
    }
    
    .score {
        font-size: 1.1rem;
    }
    
    .match-time {
        font-size: 0.7rem;
    }
    
    .match-status {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Match Title with Logos and Scores */
.match-title-section {
    margin-bottom: 0.75rem;
    text-align: center;
}

.match-title-with-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.title-team-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.team-names {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.3px;
    text-align: center;
    line-height: 1.2;
}

.live-score {
    font-size: 0.85rem;
    font-weight: 700;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(34, 197, 94, 0.3);
    margin-left: 0.5rem;
}

/* Video Title with Team Logos */
.video-title-with-logos {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.video-title-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.video-title-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.live-indicator {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: pulse-live 2s infinite;
    margin-left: 0.5rem;
}

/* Mobile responsive for title elements */
@media (max-width: 768px) {
    .match-title-with-logos {
        gap: 0.3rem;
    }
    
    .title-team-logo {
        width: 18px;
        height: 18px;
    }
    
    .team-names {
        font-size: 0.75rem;
    }
    
    .live-score {
        font-size: 0.75rem;
        padding: 0.15rem 0.3rem;
    }
    
    .video-title-logo {
        width: 20px;
        height: 20px;
    }
    
    .video-title-text {
        font-size: 1rem;
    }
    
    .live-indicator {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* AI Sports Live Stream Styles */
.ai-sports-stream-item {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(16, 185, 129, 0.05));
    border-left: 3px solid #10b981;
}

.ai-sports-stream-item:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1));
    border-left-color: #059669;
}

.ai-sports-stream-item.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.2));
    border-left-color: #047857;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3), var(--shadow-md);
}

.ai-sports-live-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.live-stream-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.live-stream-header .live-indicator {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    border: none;
    animation: live-pulse 2s infinite;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes live-pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(0.98);
    }
}

.stream-source {
    font-size: 0.7rem;
    color: #10b981;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-teams-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.team-display {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
}

.team-display:last-child {
    justify-content: flex-end;
    text-align: right;
}

.team-logo-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.team-name-short {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vs-score {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.match-score {
    font-size: 0.9rem;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.vs-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.2rem 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.match-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.match-time-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.match-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.match-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-status.live {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    animation: status-pulse 1.5s infinite;
}

.match-status.upcoming {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.match-status.finished {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.league-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.league-info i {
    color: #10b981;
    font-size: 0.8rem;
}

/* AI Sports title styling in main video */
.ai-sports-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.live-badge {
    font-size: 0.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    animation: live-pulse 2s infinite;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.live-score {
    font-size: 1.1rem;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    border: 2px solid rgba(16, 185, 129, 0.3);
}

/* Demo notice styling */
.demo-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.demo-notice i {
    font-size: 2.5rem;
    color: #3b82f6;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
}

.demo-notice h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: #3b82f6;
}

.demo-notice p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 400px;
}

/* Responsive AI Sports styles */
@media (max-width: 768px) {
    .match-teams-display {
        gap: 0.3rem;
    }
    
    .team-logo-small {
        width: 20px;
        height: 20px;
    }
    
    .team-name-short {
        font-size: 0.75rem;
        max-width: 60px;
    }
    
    .match-score,
    .vs-text {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
    
    .match-time,
    .match-status,
    .league-info {
        font-size: 0.7rem;
    }
    
    .live-stream-header {
        gap: 0.5rem;
    }
    
    .live-stream-header .live-indicator,
    .stream-source {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .ai-sports-title {
        gap: 0.5rem;
    }
    
    .live-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .match-title {
        font-size: 1.2rem;
    }
    
    .live-score {
        font-size: 1rem;
        padding: 0.3rem 0.6rem;
    }
}

/* URL Stream Styles */
.url-stream-item {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(37, 99, 235, 0.05));
    border-left: 3px solid #3b82f6;
}

.url-stream-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
    border-left-color: #2563eb;
}

.url-stream-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
    border-left-color: #1d4ed8;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3), var(--shadow-md);
}

.url-live-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.url-live-content .live-stream-header .live-indicator {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.url-live-content .stream-source {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.stream-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stream-icon-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stream-icon-title i {
    font-size: 1rem;
    flex-shrink: 0;
}

.stream-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.stream-meta-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.stream-category {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.stream-category i {
    font-size: 0.7rem;
}

.stream-description-short {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
    opacity: 0.8;
}

/* General Stream Styles */
.general-stream-item {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(124, 58, 237, 0.05));
    border-left: 3px solid #8b5cf6;
}

.general-stream-item:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.1));
    border-left-color: #7c3aed;
}

.general-stream-item.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(124, 58, 237, 0.2));
    border-left-color: #6d28d9;
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.3), var(--shadow-md);
}

.general-live-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.general-live-content .live-stream-header .live-indicator {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.general-live-content .stream-source {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Stream title styling in main video for URL streams */
.url-stream-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stream-type-badge {
    font-size: 0.7rem;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.general-stream-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stream-title-text {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.stream-url-info {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
}

.stream-url-info small {
    color: #3b82f6;
    font-weight: 500;
}

/* Responsive URL and General Stream styles */
@media (max-width: 768px) {
    .url-live-content,
    .general-live-content {
        gap: 0.5rem;
    }
    
    .stream-icon-title {
        gap: 0.4rem;
    }
    
    .stream-icon-title i {
        font-size: 0.9rem;
    }
    
    .stream-title {
        font-size: 0.85rem;
    }
    
    .stream-category,
    .stream-description-short {
        font-size: 0.7rem;
    }
    
    .stream-type-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
    
    .stream-title-text {
        font-size: 1.2rem;
    }
    
    .url-stream-title,
    .general-stream-title {
        gap: 0.5rem;
    }
}

/* =================================================================
   LAYOUT SWITCHER STYLES
   ================================================================= */

/* Layout Switcher Controls */
.layout-switcher {
    margin: 0.75rem 0;
    padding: 0.5rem;
    border-top: 1px solid var(--border-secondary);
    border-bottom: 1px solid var(--border-secondary);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: block;
    clear: both;
}

.layout-toggle-group {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    background: var(--bg-glass);
    padding: 0.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-secondary);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.layout-toggle {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    max-width: none;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.layout-toggle:hover {
    background: var(--bg-glass-hover);
    color: var(--text-secondary);
    transform: translateY(-1px);
}

.layout-toggle.active {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.layout-toggle.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    pointer-events: none;
}

/* =================================================================
   LAYOUT STYLES - LIST VIEW (Default)
   ================================================================= */

.external-streams-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* =================================================================
   LAYOUT STYLES - GRID VIEW
   ================================================================= */

.external-streams-list.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.external-streams-list.layout-grid .external-stream-item {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 140px;
}

.external-streams-list.layout-grid .stream-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.external-streams-list.layout-grid .stream-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.external-streams-list.layout-grid .stream-thumbnail {
    width: 100%;
    height: 80px;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
}

.external-streams-list.layout-grid .stream-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    margin-top: auto;
}

.external-streams-list.layout-grid .stream-actions {
    opacity: 1;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(10px);
}

/* =================================================================
   LAYOUT STYLES - COMPACT VIEW
   ================================================================= */

.external-streams-list.layout-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.external-streams-list.layout-compact .external-stream-item {
    padding: 0.5rem 0.75rem;
    min-height: auto;
}

.external-streams-list.layout-compact .stream-header {
    align-items: center;
    gap: 0.75rem;
}

.external-streams-list.layout-compact .stream-thumbnail {
    width: 60px;
    height: 34px;
    flex-shrink: 0;
}

.external-streams-list.layout-compact .stream-content {
    flex: 1;
    min-width: 0;
}

.external-streams-list.layout-compact .stream-title {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.external-streams-list.layout-compact .stream-meta {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
}

.external-streams-list.layout-compact .stream-category,
.external-streams-list.layout-compact .stream-description-short {
    font-size: 0.7rem;
    display: none; /* Hide in compact view to save space */
}

.external-streams-list.layout-compact .stream-actions {
    opacity: 1;
    position: relative;
    margin-left: auto;
}

/* =================================================================
   STREAM MODAL STYLES (Similar to Movie Modal)
   ================================================================= */

.stream-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.stream-modal-content {
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-xl);
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: var(--glass-border);
    box-shadow: var(--shadow-xl);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    display: flex;
    flex-direction: column;
}

.stream-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.stream-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.stream-modal-body {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    align-items: flex-start;
    min-height: 0;
    flex: 1;
}

.stream-video-section {
    flex: 2;
    min-width: 0;
    max-width: 70%;
}

.stream-video-section .video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    max-height: 60vh;
}

.stream-video-section video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.stream-video-section .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.stream-info-section {
    flex: 1;
    min-width: 300px;
    max-width: 30%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: fit-content;
    max-height: 60vh;
    overflow-y: auto;
}

.stream-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    line-height: 1.2;
}

.stream-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Horizontal row for Live status and viewers */
.stream-status-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.stream-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.stream-status.live {
    color: #22c55e;
}

.stream-status.live i {
    color: #ef4444;
    animation: live-pulse 2s infinite;
}

.stream-viewers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stream-category {
    background: var(--color-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.stream-description h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
}

.stream-description p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.stream-info-section .stream-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-secondary);
}

.stream-info-section .stream-actions .btn {
    flex: 1;
    min-width: 100px;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.5rem 1rem;
    min-width: 60px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
}

.mobile-bottom-nav .nav-item span {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* Active state */
.mobile-bottom-nav .nav-item.active {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    transform: translateY(-2px);
}

.mobile-bottom-nav .nav-item.active i {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.5));
}

.mobile-bottom-nav .nav-item.active span {
    font-weight: 600;
}

/* Hover effect */
.mobile-bottom-nav .nav-item:hover:not(.active) {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.mobile-bottom-nav .nav-item:hover:not(.active) i {
    transform: scale(1.05);
}

/* Active indicator dot */
.mobile-bottom-nav .nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

/* Mobile header and search optimizations */
@media (max-width: 768px) {
    /* Remove space between header and content */
    header {
        margin-bottom: 0 !important;
        padding-bottom: 0.5rem !important;
    }
    
    main {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    /* Remove extra spacing from movies header */
    .movies-header {
        margin-top: 0 !important;
        padding-top: 0.5rem !important;
    }
    
    .movies-search-container {
        margin-bottom: 0.5rem !important;
    }
    
    /* Remove spacing from streaming content */
    .streaming-layout {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* Remove spacing from sidebar search */
    .search-container {
        margin-top: 0 !important;
        margin-bottom: 1rem !important;
    }
    
    .sidebar-section {
        padding-top: 0.5rem !important;
    }
    
    /* Hide install app button text, show only icon */
    #installAppBtn .btn-text {
        display: none !important;
    }
    
    #installAppBtn {
        min-width: 40px !important;
        padding: 0.5rem !important;
    }
    
    #installAppBtn i {
        margin-right: 0 !important;
    }
}

/* Hide movie filters on mobile */
@media (max-width: 768px) {
    /* Hide trending and new releases filter buttons */
    .movies-filters .filter-btn[data-filter="trending"],
    .movies-filters .filter-btn[data-filter="new"] {
        display: none !important;
    }
    
    /* Hide genre and sort dropdowns */
    .genre-dropdown,
    .sort-dropdown {
        display: none !important;
    }
    
    /* Make remaining filter buttons more compact */
    .movies-filters {
        gap: 0.5rem !important;
        justify-content: center !important;
    }
    
    .movies-filters .filter-btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.8rem !important;
        min-width: auto !important;
    }
}

/* Show mobile navigation on tablets and phones (but not in landscape mode for phones) */
@media (max-width: 1024px) and (max-height: 768px) {
    /* Phone in landscape mode - use desktop layout */
    .mobile-bottom-nav {
        display: none !important;
    }
    
    .tab-navigation {
        display: flex !important;
    }
    
    main {
        padding-bottom: 1rem !important;
    }
}

/* Tablets and phones in portrait */
@media (max-width: 1024px) and (orientation: portrait), (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex !important;
    }
    
    /* Add bottom padding to main content to avoid overlap */
    main {
        padding-bottom: 80px !important;
    }
    
    /* Hide the main header tab navigation on mobile */
    .tab-navigation {
        display: none !important;
    }
}

/* Desktop and TV (large screens) */
@media (min-width: 1025px) {
    .mobile-bottom-nav {
        display: none !important;
    }
    
    .tab-navigation {
        display: flex !important;
    }
}

/* Phone landscape mode detection */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-bottom-nav {
        display: none !important;
    }
    
    .tab-navigation {
        display: flex !important;
    }
    
    main {
        padding-bottom: 1rem !important;
    }
    
    /* Use desktop-style layout in landscape */
    .streaming-layout {
        flex-direction: row !important;
    }
    
    .sidebar-right {
        max-height: calc(100vh - 100px) !important;
        min-height: auto !important;
    }
}

/* Smaller mobile screens */
@media (max-width: 480px) {
    .mobile-bottom-nav {
        padding: 0.4rem 0;
    }
    
    .mobile-bottom-nav .nav-item {
        padding: 0.4rem 0.75rem;
        min-width: 50px;
    }
    
    .mobile-bottom-nav .nav-item i {
        font-size: 1.1rem;
    }
    
    .mobile-bottom-nav .nav-item span {
        font-size: 0.6rem;
    }
    
    main {
        padding-bottom: 75px !important;
    }
}

/* Mobile Featured Movies Tab */
@media (max-width: 768px) {
    /* Show mobile Featured tab */
    .mobile-movies-tab {
        display: flex !important;
    }
    
    /* Hide featured movies from streaming tab on mobile */
    #streaming-content .featured-movies-section {
        display: none !important;
    }
    
    /* Mobile featured movies content */
    .mobile-featured-movies {
        padding: 1rem;
    }
    
    .mobile-featured-movies-container {
        width: 100%;
        max-width: 100%;
    }
    
    .mobile-featured-header {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .mobile-featured-header .featured-title h2 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
    }
    
    .mobile-featured-header .featured-title p {
        color: var(--text-secondary);
        font-size: 1rem;
        margin: 0;
    }
    
    .mobile-movies-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        width: 100%;
    }
    
    .mobile-movies-grid .featured-movie-card {
        width: 100%;
    }
    
    .mobile-movies-grid .movie-poster {
        aspect-ratio: 2/3;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .mobile-movies-grid .movie-poster img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .mobile-movies-grid .movie-info {
        padding: 0.5rem 0;
    }
    
    .mobile-movies-grid .movie-title {
        font-size: 0.9rem;
        font-weight: 600;
        margin: 0 0 0.25rem 0;
        color: var(--text-primary);
        line-height: 1.2;
    
    /* View toggle buttons mobile styling */
    .view-toggle-buttons {
        gap: 0.25rem;
        padding: 2px;
        margin-right: 0.5rem;
    }
    
    .view-btn {
        padding: 6px 8px;
        min-width: 32px;
        font-size: 0.9rem;
    }
    
    /* Mobile view adaptations */
    .movies-grid.view-tiles {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    
    .movies-grid.view-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }
    
    .movies-grid.view-list .movie-card {
        height: 100px;
    }
    
    .movies-grid.view-list .movie-poster {
        width: 65px;
    }
    
    .movies-grid.view-list .movie-info {
        padding: 0.75rem;
    }
    
    .movies-grid.view-list .movie-title {
        font-size: 1rem;
    }
    }
    
    .mobile-movies-grid .movie-meta {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.75rem;
        color: var(--text-secondary);
    }
    
    .mobile-movies-grid .rating {
        color: #fbbf24;
        font-weight: 500;
    }
}

/* Smaller mobile screens */
@media (max-width: 480px) {
    .mobile-featured-header .featured-title h2 {
        font-size: 1.5rem;
    }
    
    .mobile-featured-header .featured-title p {
        font-size: 0.9rem;
    }
    
    .mobile-movies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .mobile-movies-grid .movie-title {
        font-size: 0.8rem;
    }
    
    .mobile-movies-grid .movie-meta {
        font-size: 0.7rem;
    }
}

/* Mobile responsive styles for stream modal - Fit video dimensions and show info */
@media (max-width: 768px) {
    .stream-modal {
        padding: 0;
    }
    
    .stream-modal-content {
        width: 100%;
        height: auto;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
        border: none;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }
    
    .stream-modal-body {
        flex-direction: column;
        padding: 0;
        gap: 0;
        height: auto;
        box-sizing: border-box;
        overflow-y: auto;
    }
    
    /* Mobile Video Section - Proper aspect ratio */
    .stream-video-section {
        order: 1;
        width: 100%;
        padding: 0;
        max-width: 100%;
        background: #000;
    }
    
    .stream-video-section .video-container {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        max-height: 40vh;
        min-height: 200px;
        margin: 0;
        border-radius: 0;
        background: #000;
        position: relative;
    }
    
    .stream-video-section video,
    .stream-video-section iframe {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 0;
        background: #000;
    }
    
    /* Mobile Info Section - Minimal space usage */
    .stream-info-section {
        order: 2;
        width: 100%;
        min-width: unset;
        max-width: 100%;
        background: var(--bg-surface-elevated);
        padding: 0.5rem; /* Reduced padding */
        box-sizing: border-box;
        flex-shrink: 0;
    }
    
    .stream-header h1 {
        font-size: 1.1rem; /* Smaller title */
        line-height: 1.2;
        margin: 0 0 0.25rem 0; /* Minimal margin */
        font-weight: 600;
    }
    
    .stream-meta {
        flex-wrap: wrap;
        gap: 0.25rem; /* Smaller gap */
        margin-bottom: 0.5rem; /* Reduced margin */
        font-size: 0.8rem; /* Smaller meta text */
        width: 100% !important;
    }
    
    /* Mobile stream status row - push watching to right */
    .stream-modal .stream-info-section .stream-status-row {
        gap: 0.75rem !important;
        justify-content: space-between !important;
        width: 100% !important;
        display: flex !important;
    }
    
    .stream-modal .stream-info-section .stream-status {
        font-size: 0.8rem !important;
        flex-shrink: 0 !important;
    }
    
    .stream-modal .stream-info-section .stream-viewers {
        font-size: 0.8rem !important;
        margin-left: auto !important;
        text-align: right !important;
        flex-shrink: 0 !important;
    }
    
    .stream-description {
        margin: 0.5rem 0; /* Reduced margins */
    }
    
    .stream-description h3 {
        font-size: 0.9rem; /* Smaller heading */
        margin: 0 0 0.25rem 0; /* Minimal margin */
        font-weight: 500;
    }
    
    .stream-description p {
        font-size: 0.8rem; /* Smaller text */
        line-height: 1.3; /* Tighter line height */
        margin: 0;
    }
    
    /* Mobile Modal Close Button */
    .stream-modal-close {
        position: fixed;
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        background: rgba(0, 0, 0, 0.7);
        z-index: 1001;
        border-radius: 50%;
    }
    
    /* Mobile Action Buttons - Compact layout */
    .stream-info-section .stream-actions {
        display: flex;
        gap: 0.5rem; /* Smaller gap */
        margin-top: 0.5rem; /* Reduced margin */
        padding-top: 0.5rem; /* Reduced padding */
        border-top: 1px solid var(--border-secondary);
    }
    
    .stream-info-section .stream-actions .btn {
        flex: 1;
        padding: 0.5rem 0.75rem; /* Compact padding */
        font-size: 0.8rem; /* Smaller text */
        min-width: auto;
        min-height: 36px; /* Consistent height */
        
        /* 3D Button Styling */
        background: linear-gradient(145deg, #4f46e5, #3730a3);
        border: none;
        border-radius: 8px;
        color: white;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        position: relative;
        overflow: hidden;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        
        /* 3D Effect */
        box-shadow: 
            0 4px 8px rgba(79, 70, 229, 0.3),
            0 2px 4px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
        
        /* Glow base */
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    }
    
    .stream-info-section .stream-actions .btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.6s;
        z-index: 1;
    }
    
    .stream-info-section .stream-actions .btn:hover {
        transform: translateY(-2px) scale(1.02);
        background: linear-gradient(145deg, #5b52f0, #4338ca);
        
        /* Enhanced glow on hover */
        box-shadow: 
            0 8px 25px rgba(79, 70, 229, 0.5),
            0 4px 10px rgba(79, 70, 229, 0.3),
            0 0 20px rgba(79, 70, 229, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(139, 92, 246, 0.6),
            0 0 30px rgba(139, 92, 246, 0.4);
    }
    
    .stream-info-section .stream-actions .btn:hover::before {
        left: 100%;
    }
    
    .stream-info-section .stream-actions .btn:active {
        transform: translateY(0) scale(0.98);
        box-shadow: 
            0 2px 4px rgba(79, 70, 229, 0.4),
            inset 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    /* Different colors for different buttons */
    .stream-info-section .stream-actions .btn:nth-child(1) {
        /* Fullscreen button - blue gradient */
        background: linear-gradient(145deg, #0ea5e9, #0284c7);
    }
    
    .stream-info-section .stream-actions .btn:nth-child(1):hover {
        background: linear-gradient(145deg, #38bdf8, #0ea5e9);
        box-shadow: 
            0 8px 25px rgba(14, 165, 233, 0.5),
            0 4px 10px rgba(14, 165, 233, 0.3),
            0 0 20px rgba(14, 165, 233, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(56, 189, 248, 0.6),
            0 0 30px rgba(56, 189, 248, 0.4);
    }
    
    .stream-info-section .stream-actions .btn:nth-child(2) {
        /* Share button - green gradient */
        background: linear-gradient(145deg, #10b981, #059669);
    }
    
    .stream-info-section .stream-actions .btn:nth-child(2):hover {
        background: linear-gradient(145deg, #34d399, #10b981);
        box-shadow: 
            0 8px 25px rgba(16, 185, 129, 0.5),
            0 4px 10px rgba(16, 185, 129, 0.3),
            0 0 20px rgba(16, 185, 129, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(52, 211, 153, 0.6),
            0 0 30px rgba(52, 211, 153, 0.4);
    }
    
    /* Pulsing animation for enhanced glow effect */
    @keyframes buttonPulse {
        0%, 100% {
            box-shadow: 
                0 8px 25px rgba(79, 70, 229, 0.5),
                0 4px 10px rgba(79, 70, 229, 0.3),
                0 0 20px rgba(79, 70, 229, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
        }
        50% {
            box-shadow: 
                0 8px 30px rgba(79, 70, 229, 0.7),
                0 4px 12px rgba(79, 70, 229, 0.4),
                0 0 30px rgba(79, 70, 229, 0.8),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
        }
    }
    
    @keyframes buttonPulseBlue {
        0%, 100% {
            box-shadow: 
                0 8px 25px rgba(14, 165, 233, 0.5),
                0 4px 10px rgba(14, 165, 233, 0.3),
                0 0 20px rgba(14, 165, 233, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
        }
        50% {
            box-shadow: 
                0 8px 30px rgba(14, 165, 233, 0.7),
                0 4px 12px rgba(14, 165, 233, 0.4),
                0 0 30px rgba(14, 165, 233, 0.8),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
        }
    }
    
    @keyframes buttonPulseGreen {
        0%, 100% {
            box-shadow: 
                0 8px 25px rgba(16, 185, 129, 0.5),
                0 4px 10px rgba(16, 185, 129, 0.3),
                0 0 20px rgba(16, 185, 129, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
        }
        50% {
            box-shadow: 
                0 8px 30px rgba(16, 185, 129, 0.7),
                0 4px 12px rgba(16, 185, 129, 0.4),
                0 0 30px rgba(16, 185, 129, 0.8),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
        }
    }
    
    /* Apply pulsing animation on hover */
    .stream-info-section .stream-actions .btn:hover {
        animation: buttonPulse 2s ease-in-out infinite;
    }
    
    .stream-info-section .stream-actions .btn:nth-child(1):hover {
        animation: buttonPulseBlue 2s ease-in-out infinite;
    }
    
    .stream-info-section .stream-actions .btn:nth-child(2):hover {
        animation: buttonPulseGreen 2s ease-in-out infinite;
    }
}

@media (max-width: 480px) {
    /* Smaller mobile screens - ultra compact layout */
    .stream-video-section .video-container {
        max-height: 35vh;
        min-height: 180px;
    }
    
    
    .stream-info-section {
        padding: 0.4rem; /* Even more compact */
    }
    
    .stream-header h1 {
        font-size: 1rem; /* Smaller on tiny screens */
        line-height: 1.1;
        margin: 0 0 0.2rem 0;
    }
    
    .stream-meta {
        font-size: 0.75rem; /* Tiny meta text */
        gap: 0.2rem;
        margin-bottom: 0.3rem;
    }
    
    /* Small mobile stream status row - push watching to right */
    .stream-modal .stream-info-section .stream-status-row {
        gap: 0.5rem !important;
        justify-content: space-between !important;
        width: 100% !important;
    }
    
    .stream-modal .stream-info-section .stream-status {
        font-size: 0.75rem !important;
        flex-shrink: 0 !important;
    }
    
    .stream-modal .stream-info-section .stream-viewers {
        font-size: 0.75rem !important;
        margin-left: auto !important;
        text-align: right !important;
        flex-shrink: 0 !important;
    }
    
    .stream-description {
        margin: 0.3rem 0;
    }
    
    .stream-description h3 {
        font-size: 0.8rem;
        margin: 0 0 0.15rem 0;
    }
    
    .stream-description p {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    .stream-info-section .stream-actions {
        gap: 0.4rem;
        margin-top: 0.4rem;
        padding-top: 0.4rem;
        flex-direction: row; /* Keep horizontal on small screens */
    }
    
    .stream-info-section .stream-actions .btn {
        padding: 0.4rem 0.6rem; /* More compact buttons */
        font-size: 0.75rem;
        min-height: 32px;
        
        /* Maintain 3D effects on small screens */
        border-radius: 6px; /* Slightly smaller radius */
        
        /* Adjusted shadows for smaller buttons */
        box-shadow: 
            0 3px 6px rgba(79, 70, 229, 0.25),
            0 1px 3px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    
    .stream-info-section .stream-actions .btn:hover {
        transform: translateY(-1px) scale(1.01); /* Subtle effect on small screens */
        
        /* Reduced glow for small screens */
        box-shadow: 
            0 6px 15px rgba(79, 70, 229, 0.4),
            0 3px 8px rgba(79, 70, 229, 0.25),
            0 0 15px rgba(79, 70, 229, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);
        
        text-shadow: 
            0 0 8px rgba(255, 255, 255, 0.6),
            0 0 15px rgba(139, 92, 246, 0.5);
    }
    
    .stream-modal-close {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        top: 8px;
        right: 8px;
    }
}

/* =================================================================
   MOBILE FLOATING PLAYER (DEPRECATED - REPLACED BY MODAL)
   ================================================================= */

/* Mobile floating player styles */
@media (max-width: 768px) {
    /* Hide main player section by default on mobile */
    .main-player {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    /* Show floating player when active */
    .main-player.floating-active {
        display: block;
        animation: slideUpFadeIn 0.3s ease-out;
    }
    
    /* Floating player video container */
    .main-player.floating-active .video-container {
        position: relative;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 1rem;
        box-sizing: border-box;
    }
    
    /* Video element in floating player */
    .main-player.floating-active video {
        width: 100%;
        height: auto;
        max-height: 70vh;
        border-radius: 12px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }
    
    /* Floating player controls */
    .floating-player-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
        padding: 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        z-index: 1001;
    }
    
    .floating-close-btn {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
        padding: 0.75rem;
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .floating-close-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.05);
    }
    
    .floating-title {
        color: white;
        font-size: 1rem;
        font-weight: 600;
        margin: 0;
        flex: 1;
        margin-right: 1rem;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Video info in floating mode */
    .main-player.floating-active .video-info {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
        padding: 1rem;
        color: white;
    }
    
    .main-player.floating-active .video-info h2 {
        font-size: 1.1rem;
        margin: 0 0 0.5rem 0;
        color: white;
    }
    
    .main-player.floating-active .stream-meta {
        font-size: 0.9rem;
        opacity: 0.8;
    }
    
    /* Animation for floating player */
    @keyframes slideUpFadeIn {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Animation for closing floating player */
    .main-player.floating-closing {
        animation: slideDownFadeOut 0.3s ease-in;
    }
    
    @keyframes slideDownFadeOut {
        from {
            opacity: 1;
            transform: translateY(0);
        }
        to {
            opacity: 0;
            transform: translateY(100%);
        }
    }
    
    /* Adjust main layout for mobile when player is hidden */
    .main-content {
        display: block;
    }
    
    /* Sidebar takes full width on mobile when player is hidden */
    .sidebar-right {
        width: 100%;
        margin: 0;
        padding: 1rem;
    }
    
    /* Prevent body scroll when floating player is active */
    body.floating-player-active {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

/* =================================================================
   RESPONSIVE LAYOUT ADJUSTMENTS
   ================================================================= */

@media (max-width: 768px) {
    .layout-switcher {
        margin: 0.5rem 0;
        padding: 0.4rem 0;
    }
    
    .layout-toggle-group {
        gap: 0.15rem;
        padding: 0.2rem;
    }
    
    .layout-toggle {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem;
        flex: 1;
        min-width: 0;
    }
    
    /* Grid adjustments for mobile */
    .external-streams-list.layout-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 0.75rem;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .external-streams-list.layout-grid .external-stream-item {
        min-height: 120px;
    }
    
    .external-streams-list.layout-grid .stream-thumbnail {
        height: 60px;
    }
    
    /* Compact adjustments for mobile */
    .external-streams-list.layout-compact .stream-thumbnail {
        width: 50px;
        height: 28px;
    }
    
    .external-streams-list.layout-compact .stream-title {
        font-size: 0.8rem;
    }
    
    .external-streams-list.layout-compact .stream-meta {
        font-size: 0.7rem;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    /* Very small screens - single column grid */
    .external-streams-list.layout-grid {
        grid-template-columns: 1fr;
    }
    
    .external-streams-list.layout-grid .external-stream-item {
        min-height: 100px;
    }
    
    .external-streams-list.layout-grid .stream-thumbnail {
        height: 50px;
    }
}

/* Movie Counter */
.movie-counter {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 25px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
}

.movie-counter:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.movie-counter i {
    color: var(--color-primary-light);
    font-size: 1rem;
}

.movie-counter span {
    color: var(--text-secondary);
    font-family: var(--font-family-mono);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .movie-counter {
        bottom: 90px; /* Above mobile nav */
        right: 15px;
        font-size: 0.85rem;
        padding: 0.6rem 0.9rem;
        border-radius: 20px;
    }
    
    .movie-counter i {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .movie-counter {
        bottom: 85px;
        right: 10px;
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
}

/* ==================== FINAL OVERRIDE - MOBILE TABS ==================== */
/* Force icon-only tabs on mobile - Ultimate priority */
@media screen and (max-width: 768px) {
    .tab-btn span,
    .tab-navigation .tab-btn span,
    body .tab-btn span,
    html .tab-btn span {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    .tab-btn,
    .tab-navigation .tab-btn,
    body .tab-btn,
    html .tab-btn {
        padding: 0.7rem !important;
        min-width: 48px !important;
        min-height: 48px !important;
        justify-content: center !important;
        border-radius: 50% !important;
        text-align: center !important;
    }
    
    .tab-btn i,
    .tab-navigation .tab-btn i,
    body .tab-btn i,
    html .tab-btn i {
        font-size: 1.3rem !important;
        margin: 0 !important;
    }
}

/* ==================== FINAL OVERRIDE - MOVIES GRID ==================== */
/* Force 5 columns on desktop screens - Ultimate priority */
@media screen and (min-width: 1025px) {
    .movies-grid,
    .movies-container .movies-grid,
    #movies-section .movies-grid,
    body .movies-grid,
    html .movies-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 1rem !important;
        display: grid !important;
    }
}

/* Backup rule for any desktop screen */
@media screen and (min-width: 1200px) {
    .movies-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 1rem !important;
    }
}
