:root {
            /* Base Grid Unit - Everything is a multiple of 4px */
            --unit: 4px;
            
            /* Pure Monochrome Palette */
            --bg-primary: #0a0a0a;      /* Deep black background */
            --bg-secondary: #141414;    /* Slightly lighter */
            --bg-tertiary: #1f1f1f;     /* Card backgrounds */
            
            --text-primary: #e8e8e8;    /* High contrast text */
            --text-secondary: #888;     /* Muted text */
            --text-tertiary: #555;      /* Very muted */
            
            /* Functional colors - used only when meaningful */
            --accent: #fff;             /* Pure white for highest emphasis */
            --accent-muted: #888;       /* Gray for secondary emphasis */
            --accent-hover: #c23616;    /* Subtle red on interaction - YouTube heritage */
            
            --border: #2a2a2a;          /* Subtle borders only */
            --border-light: #333;       /* Lighter borders */
            
            /* Consistent Border Radius - No mixing */
            --radius-small: 2px;
            --radius-medium: 4px;
            --radius-large: 8px;
            
            /* Typography Scale - Musical Intervals */
            --font-size-xs: 11px;       /* Caption */
            --font-size-sm: 13px;       /* Small text */
            --font-size-base: 15px;     /* Body */
            --font-size-lg: 18px;       /* Subheading */
            --font-size-xl: 24px;       /* Heading */
            --font-size-2xl: 32px;      /* Large heading */
            --font-size-3xl: 48px;      /* Hero */
            
            /* Spacing Scale - Fibonacci-inspired */
            --space-xs: 4px;
            --space-sm: 8px;
            --space-md: 16px;
            --space-lg: 24px;
            --space-xl: 40px;
            --space-2xl: 64px;
            
            /* Video Card Sizing */
            --video-card-min-width: 180px;
            --video-card-base-width: 240px;
            --video-card-scale: 1;
            
            /* Remove these old inconsistent variables */
            --primary-red: #4a9eff;     /* Redirect to accent */
            --dark-bg: #0a0a0a;
            --dark-surface-1: #141414;
            --dark-surface-2: #1f1f1f;
            --dark-surface-3: #2a2a2a;
            --dark-surface-4: #141414;
            --accent-blue: #4a9eff;
            --accent-green: #4a9eff;
            --border-subtle: #2a2a2a;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
            background-color: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.6;  /* Better readability */
            font-size: var(--font-size-base);
            overflow: hidden;
            overflow-x: hidden;
            padding-bottom: var(--space-lg);
            max-width: 100vw;
            /* Add font smoothing for better rendering */
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        .header {
            height: fit-content;
            background-color: var(--dark-bg);
            padding: 0 24px;
            position: sticky;
            top: 0;
            z-index: 100;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
            padding: 1em;
        }

        .header.hidden {
            display: none;
        }

        .landing-page {
            padding: 1em;
            height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            background-color: var(--dark-bg);
            position: relative;
            z-index: 50;
            overflow: hidden;
            transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .landing-page.hidden {
            display: none;
        }

        .landing-search-container {
            width: 100%;
            max-width: 600px;
            background-color: transparent;
            border-radius: 0;  /* Remove rounded corners */
            padding: 0;
            border-bottom: 2px solid var(--border);
            margin-top: var(--space-xl);
            transition: border-color 0.2s ease;
        }

        .landing-search-container:hover,
        .landing-search-container:focus-within {
            border-bottom-color: var(--text-primary);
        }

        @media (max-width: 768px) {
            .header {
                height: auto;
                min-height: 56px;
                background-color: var(--dark-bg);
                padding: 8px 12px;
                overflow-x: hidden;
                /* Support for flex-wrap when Add Instance button is shown */
                flex-wrap: nowrap;
            }
            .landing-page {
                padding: 1em 1em;
            }
        }

        .header-content {
            display: flex;
            align-items: center;
            width: 100%;
            max-width: 1200px;
            justify-content: space-between;
            transition: all 0.4s ease;
            gap: 12px;
            flex-wrap: wrap;
        }
        
        /* Portrait mode header optimization */
        @media (max-width: 768px) and (orientation: portrait) {
            .header-content {
                gap: 8px;
                flex-wrap: nowrap;
                position: relative;
            }
            
            /* Hide logo in portrait mode when header is visible */
            .header:not(.hidden) .header-content .logo {
                display: none;
            }
            
            /* Search container takes most of the space */
            .header:not(.hidden) .search-container {
                flex: 1;
                max-width: calc(100% - 120px); /* Leave room for Add Instance button */
                margin: 0;
            }
            
            /* Compact Add Instance button in portrait */
            .header:not(.hidden) .add-instance-btn {
                padding: 8px 12px;
                font-size: 12px;
                border-radius: 20px;
                min-width: auto;
                white-space: nowrap;
            }
            
            /* Hide text on very small screens, show only icon */
            @media (max-width: 380px) {
                .header:not(.hidden) .add-instance-btn {
                    padding: 8px;
                    width: 36px;
                    height: 36px;
                    border-radius: 50%;
                    justify-content: center;
                }
                
                .header:not(.hidden) .add-instance-btn svg {
                    margin: 0;
                }
                
                .header:not(.hidden) .add-instance-btn::after {
                    content: '';
                    display: none;
                }
            }
        }

        .hero-text {
            text-align: center;
            margin-bottom: 40px;
            max-width: 650px;
            padding: 0 20px;
            opacity: 1;
            transform: translateY(0);
            transition: opacity 0.5s ease, transform 0.5s ease;
        }

        .hero-text.hidden {
            opacity: 0;
            transform: translateY(-20px);
            pointer-events: none;
        }

        .hero-text h1 {
            font-size: var(--font-size-3xl);
            font-weight: 200;  /* Ultra light for elegance */
            margin-bottom: var(--space-lg);
            line-height: 1.2;
            letter-spacing: -0.02em;
            color: var(--text-primary);
        }

        .hero-text p {
            font-size: var(--font-size-lg);
            color: var(--text-secondary);
            line-height: 1.8;
            margin-top: 0;
            font-weight: 300;
        }

        .logo-title-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 24px;
            margin-bottom: 30px;
            /* animation: fadeInUp 0.8s ease-out; */
        }

        .logo-title-container .logo {
            font-size: 2.5rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .logo-title-container .logo img {
            height: 4.5em;
            width: auto;
            filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
        }

        .logo-title-container h1 {
            margin: 0;
            font-size: 3.5rem;
        }

        .main-content {
            padding: 24px;
            min-height: calc(100vh - 100px);
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.5s ease-in, transform 0.5s ease-in;
            pointer-events: none;
            display: none;
        }

        .main-content.visible {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
            display: block;
        }

        /* Adjust  media queries for new header structure */
         @media (max-width: 768px) {
            .header {
                padding: 8px 12px; /* Reduce padding on mobile */
            }
            
            .header-contracted {
                height: 70px;
                background-color: var(--dark-surface-1);
                padding: 0 16px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
            }
            
            /* Very small screens */
            @media (max-width: 480px) {
                .header-contracted {
                    height: 60px;
                    padding: 0 12px;
                }
                
                .header-contracted .search-input {
                    padding: 8px 12px;
                    font-size: 14px;
                }
                
                .header-contracted .search-button {
                    height: 40px;
                    width: 42px;
                }
                
                .header-contracted .search-button svg {
                    width: 18px;
                    height: 18px;
                }
                
                .header-contracted .logo img {
                    height: 2em;
                }
                /* Additional adjustment for very small screens */
                .kofi-floating-chat {
                    bottom: 110px !important; /* Even higher on very small screens */
                }
            }
            
            .hero-text {
                margin-bottom: 20px; /* Reduced margin */
                max-width: 90%; /* Increased width */
            }
            
            .hero-text h1 {
                font-size: 2.5rem;
            }
            
            .hero-text p {
                font-size: 1.1rem;
            }
            
            .logo-title-container {
                gap: 16px;
                margin-bottom: 20px;
                max-width: 100%; /* Ensure it fits on screen */
            }
            
            .logo-title-container .logo {
                font-size: 2rem;
                gap: 12px;
                flex-wrap: wrap; /* Allow wrapping if needed */
                justify-content: center;
            }
            
            .logo-title-container .logo img {
                height: 3.5em;
                max-width: 80vw; /* Limit logo width */
            }
            
            .logo-title-container h1 {
                font-size: 2.5rem;
                word-wrap: break-word; /* Break long words */
                max-width: 100%;
            }
            
            .header-contracted .search-container {
                max-width: 100%;
            }
            
            .search-container {
                max-width: 90%; /* Increased width */
                background-color: #121212;
                margin-top: 10px; /* Reduced space above */
                margin-bottom: 30px; /* Add space below */
            }
            
            /* In portrait mode with header visible, optimize search container */
            @media (orientation: portrait) {
                .header:not(.hidden) .search-container {
                    margin: 0;
                    max-width: none;
                    flex: 1;
                }
            }
            .search-input {
                padding: 12px 16px;
                font-size: 16px;
            }
            
            .search-button {
                width: 50px;
            }
            
            .search-button svg {
                width: 22px;
                height: 22px;
            }
            
            .header-contracted .search-button {
                height: 44px;
                width: 46px;
            }
            
            .header-contracted .search-input {
                padding: 10px 14px;
                font-size: 15px;
            }
            
            .timeline-mark-label {
                font-size: 11px;
            }
            
            .timeline-container {
                top: var(--header-height-mobile, 70px) !important; /* Dynamic mobile header height */
                padding: 0px 0px;
                padding-bottom: 1vh;
            }
            
            /* For devices with larger header height */
            @media (min-width: 769px) {
                .timeline-container {
                    top: 80px;
                }
            }
            
            /* Very small screens */
            @media (max-width: 480px) {
                .logo-title-container .logo {
                    font-size: 1.8rem;
                    gap: 10px;
                }
                
                .logo-title-container .logo img {
                    height: 3em;
                }
                
                .logo-title-container h1 {
                    font-size: 2rem;
                }
                
                .hero-text h1 {
                    font-size: 2rem;
                }
                
                .hero-text p {
                    font-size: 1rem;
                }
                
                .search-input {
                    padding: 10px 14px !important;
                    font-size: 14px;
                }
                
                .search-button {
                    height: 44px;
                    width: 46px;
                }
                
                .search-button svg {
                    width: 20px;
                    height: 20px;
                }
            }
            
            .timeline-labels {
                padding: 0px 1em;
            }

            .timeline-header .channel-info {
                display: none; /* Hide channel info in portrait mode */
            }

            .timeline-header {
                justify-content: center; /* Center the timeline when channel info is hidden */
            }

            .timeline {
                height: 70px; /* Thinner timeline in portrait mode */
            }

            .timeline-mark.major {
                top: 25px;
            }

            .timeline-mark.minor {
                top: 30px;
            }

            .timeline-thumb {
                height: 40px;
            }

            .videos-grid {
                gap: 8px;
                grid-template-columns: 1fr 1fr !important; /*  Force two columns */
            }
            
            .placeholder h2 {
                font-size: 24px;
            }
            
            .placeholder p {
                font-size: 16px;
            }
            
            /* Very small screens */
            @media (max-width: 480px) {
                .placeholder h2 {
                    font-size: 20px;
                }
                
                .placeholder p {
                    font-size: 14px;
                }
                .header-contracted .header-content .logo {
                    position: relative !important;
                    left: auto !important;
                }
            }
            
            /* Mobile styling for contracted header */
            .header-contracted .header-content .logo {
                display: flex;
                align-items: center;
                min-width: fit-content;
            }
            
            .header-contracted .header-content .logo img {
                height: 2.5em;
            }
            
            .header-contracted .header-content {
                display: flex !important;
                justify-content: space-between;
                align-items: center;
                width: 100%;
                max-width: 1200px;
            }
        }

        /* Logo in the main hero section - visible only in expanded header */
        .logo-title-container .logo {
            font-size: 2.5rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 16px;
        }
        
        .logo-title-container .logo img {
            height: 4.5em;
            width: auto;
            filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
        }
        
        /* Logo in header-content - visible by default */
        .header-content .logo {
            display: flex;
            align-items: center;
            margin-right: 24px;
            flex-shrink: 0;
        }
        /* Show logo in header-content when header is contracted */
        .header-contracted .header-content .logo {
            display: flex;
            align-items: center;
            margin-right: 24px;
            flex-shrink: 0;
            position: absolute;
            left: 1em;
        }
        
        .header-content .logo img {
            height: 40px;
            width: auto;
            display: block;
        }
        
        .logo span {
            background: linear-gradient(90deg,
                rgba(255, 255, 255, 0.95) 0%,
                rgba(255, 255, 255, 0.85) 25%,
                rgba(255, 255, 255, 0.75) 50%,
                rgba(255, 255, 255, 0.85) 75%,
                rgba(255, 255, 255, 0.95) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-weight: 300;  /* Much lighter weight for zen feel */
            font-size: 1.1rem;
            margin-left: 12px;
            letter-spacing: 0.15em;  /* Add spacing for elegance */
            text-transform: lowercase;  /* Subtle lowercase for minimal feel */
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
            position: relative;
            transition: opacity 0.3s ease;
        }
        
        /* Add subtle iridescent shimmer on hover */
        .logo:hover span {
            background: linear-gradient(90deg,
                rgba(255, 200, 200, 0.9) 0%,
                rgba(200, 255, 200, 0.9) 33%,
                rgba(200, 200, 255, 0.9) 66%,
                rgba(255, 200, 200, 0.9) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: subtle-spectrum 12s linear infinite;
        }
        
        @keyframes subtle-spectrum {
            0% { filter: hue-rotate(0deg) brightness(1.1); }
            100% { filter: hue-rotate(360deg) brightness(1.1); }
        }
        /* Hide the TimeTube text on mobile in contracted header */
        @media (max-width: 768px) {
            .header-contracted .header-content .logo span {
                display: none;
            }
            .header-contracted .header-content .logo img {
                height: 2.5em;
                margin-right: 0;
            }
            .header-contracted .header-content .logo {
            position: relative !important;
            left: auto !important;
            }
        }

        .footer-links {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-top: 30px;
            flex-wrap: wrap;
        }

        .footer-link {
            color: var(--text-tertiary);
            text-decoration: none;
            font-size: var(--font-size-sm);
            padding: var(--space-sm) var(--space-md);
            border: none;
            border-radius: 0;
            transition: color 0.2s ease;
            background-color: transparent;
            font-weight: 400;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .footer-link:hover {
            color: var(--text-primary);
        }

        /* Landing page footer specific styles */
        .landing-footer {
            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            margin-top: 0;
        }

        /* Mobile adjustments for footer links */
        @media (max-width: 768px) {
            body {
                overflow: auto !important;
                height: auto !important;
            }
            
            .landing-page {
                height: auto !important;
                min-height: 100vh;
                overflow: visible !important;
                display: flex !important;
                padding: 1rem;
                justify-content: center !important;
                align-items: center !important;
            }
            
            /* Ensure hero text is properly hidden when landing page is hidden */
            .landing-page.hidden {
                display: none !important;
            }
            
            .landing-page.hidden .hero-text {
                display: none !important;
            }
            
            .hero-text {
                margin-bottom: 2rem;
                padding: 0;
                max-width: 100%;
            }
            
            .logo-title-container {
                text-align: center;
                margin-bottom: 1.5rem;
            }
            
            .logo-title-container .logo {
                margin-bottom: 1rem;
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 0.5rem;
            }
            
            .logo-title-container .logo img {
                height: 3rem;
                width: auto;
            }
            
            .logo-title-container h1 {
                font-size: 1.8rem;
                margin: 0;
                line-height: 1.2;
            }
            
            .landing-search-container {
                margin: 2rem 0;
                width: 100%;
                max-width: 100%;
            }
            
            .footer-links {
                gap: 10px;
                margin-top: 2rem;
                flex-wrap: wrap;
                justify-content: center;
            }
            
            .footer-link {
                font-size: 12px;
                padding: 6px 12px;
            }
            
            .landing-footer {
                position: static !important;
                bottom: auto !important;
                left: auto !important;
                transform: none !important;
                margin-top: 2rem;
                margin-bottom: 2rem;
                gap: 8px;
            }
            
            .kofi-floating-chat {
                display: none !important;
            }
            
            /* Fix header search container overflow on mobile */
            .header-content {
                flex-direction: row;
                gap: 8px;
                align-items: center;
                flex-wrap: nowrap;
            }
            
            .header-content .search-container {
                flex: 1;
                max-width: calc(100% - 80px);
                margin: 0;
            }
            
            .header-content .logo {
                display: none;
            }
        }

        .nav-links {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            gap: 15px;
            z-index: 101;
        }

        .nav-link {
            color: var(--text-secondary);
            text-decoration: none;
            font-size: 14px;
            padding: 8px 16px;
            border: 1px solid var(--dark-surface-3);
            border-radius: 20px;
            transition: all 0.3s ease;
            background-color: rgba(255, 255, 255, 0.05);
            font-weight: 500;
        }

        .nav-link:hover {
            background-color: rgba(255, 255, 255, 0.1);
            border-color: var(--accent-blue);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            color: var(--text-primary);
        }

        /* Mobile adjustments for nav links */
        @media (max-width: 768px) {
            .nav-links {
                top: 10px;
                right: 10px;
                gap: 8px;
            }
            
            .nav-link {
                font-size: 12px;
                padding: 6px 12px;
            }
        }

        /* Hide nav links in contracted header */
        .header-contracted .nav-links {
            display: none;
        }

        /* Search filters */
        .search-filters {
            position: sticky;
            top: 217px;
            z-index: 8;
            border-radius: 10px;
            padding: 0;
            margin: 0 0 2em 0;
            border: 1px solid #313131;
            background-color: var(--dark-surface-4) !important;
            transition: all 0.3s ease;
        }
        
        /* Compact mode when collapsed */
        .search-filters.has-collapsed-content {
            margin: 0 0 1em 0; /* Reduce bottom margin when collapsed */
        }
        
        .search-filters-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 20px;
            border-bottom: 1px solid var(--border);
            cursor: pointer;
            user-select: none;
            transition: padding 0.3s ease, border-bottom 0.3s ease;
        }
        
        /* Compact header when collapsed */
        .search-filters.has-collapsed-content .search-filters-header {
            padding: 10px 15px;
            border-bottom: none;
        }
        
        .search-filters-header h3 {
            margin: 0;
            color: var(--text-primary);
            font-size: 18px;
            font-weight: 500;
            transition: font-size 0.3s ease;
        }
        
        /* Smaller title when collapsed */
        .search-filters.has-collapsed-content .search-filters-header h3 {
            font-size: 14px;
        }
        
        .filters-toggle-btn {
            background: transparent;
            border: 1px solid transparent;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 4px 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            transition: all 0.2s ease;
            border-radius: 5px;
            position: relative;
        }
        
        .filters-toggle-btn:hover {
            color: var(--text-primary);
            background-color: rgba(255, 255, 255, 0.05);
            border-color: var(--border-light);
        }
        
        /* Pulse animation for first load */
        @keyframes pulseHint {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.7; transform: scale(1.05); }
        }
        
        .filters-toggle-btn.pulse-hint {
            animation: pulseHint 2s ease-in-out 3;
        }
        
        .expand-hint {
            font-size: 12px;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            opacity: 0.8;
        }
        
        .filters-toggle-btn:hover .expand-hint {
            opacity: 1;
        }
        
        .filters-toggle-btn.collapsed .expand-hint {
            display: inline;
        }
        
        .filters-toggle-btn:not(.collapsed) .expand-hint {
            display: inline;
        }
        
        .filters-toggle-btn svg {
            transition: transform 0.3s ease;
        }
        
        .filters-toggle-btn.collapsed svg {
            transform: rotate(-90deg);
        }
        
        .filter-content {
            padding: 20px;
            max-height: 600px;
            overflow: hidden;
            transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
            opacity: 1;
        }
        
        .filter-content.collapsed {
            max-height: 0;
            padding: 0 20px;
            opacity: 0;
            overflow: hidden;
            display: none; /* Completely hide when collapsed to save space */
        }
        
        /* Filter summary shown when collapsed */
        .filter-summary {
            display: none;
            color: var(--text-secondary);
            font-size: 12px;
            margin-left: 10px;
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        .search-filters.has-collapsed-content .filter-summary {
            display: block;
        }
        
        .search-filters-header-left {
            display: flex;
            align-items: center;
            flex: 1;
            min-width: 0; /* Allow text truncation */
        }
        
        .filter-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 20px;
        }
        
        .filter-grid label {
            display: block;
            margin-bottom: 8px;
            font-size: 14px;
            color: var(--text-secondary);
        }
        
        .filter-grid input {
            width: 100%;
            padding: 10px;
            background-color: var(--dark-bg);
            border: 1px solid var(--dark-surface-3);
            border-radius: 5px;
            color: var(--text-primary);
            font-size: 14px;
        }
        
        .view-controls-container {
            grid-column: span 2;
            display: flex;
            gap: 30px;
            align-items: start;
        }
        
        .view-mode-toggle {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        
        .view-mode-toggle label {
            color: var(--text-secondary);
            font-size: 14px;
            margin-bottom: 0;
        }
        
        .view-mode-buttons {
            display: flex;
            gap: 4px;
            background: var(--dark-surface-3);
            padding: 2px;
            border-radius: 6px;
        }
        
        .view-mode-btn {
            background: transparent;
            border: none;
            color: var(--text-secondary);
            padding: 6px 8px;
            cursor: pointer;
            border-radius: 4px;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .view-mode-btn:hover {
            color: var(--text-primary);
            background: rgba(255, 255, 255, 0.05);
        }
        
        .view-mode-btn.active {
            background: var(--accent-hover);
            color: white;
        }
        
        .view-mode-btn svg {
            width: 18px;
            height: 18px;
        }
        
        .card-size-container {
            flex: 1;
        }
        
        @media (max-width: 768px) {
            .card-size-container {
                grid-column: span 1;
            }
        }
        
        .filter-buttons {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }
        
        .filter-buttons button {
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s ease;
        }
        
        #applyFilters {
            background-color: var(--accent-hover);
            color: white;
        }
        
        #applyFilters:hover {
            background-color: var(--primary-red);
        }
        
        #clearFilters {
            background-color: var(--dark-surface-3);
            color: var(--text-primary);
        }
        
        #clearFilters:hover {
            background-color: var(--dark-surface-2);
        }
        
        .search-filters input, .search-filters button {
            font-family: 'Roboto', Arial, sans-serif;
        }
        
        /* Colorful border effect for buttons on hover */
        .search-filters button {
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
            border: 1px solid transparent !important;
        }
        
        .search-filters button::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            background: linear-gradient(90deg,
                rgba(255, 71, 87, 1) 0%,
                rgba(255, 135, 71, 1) 14%,
                rgba(255, 195, 71, 1) 28%,
                rgba(150, 255, 71, 1) 42%,
                rgba(71, 255, 195, 1) 56%,
                rgba(71, 195, 255, 1) 70%,
                rgba(135, 71, 255, 1) 84%,
                rgba(255, 71, 87, 1) 100%);
            border-radius: 5px;
            opacity: 0;
            z-index: -1;
            transition: opacity 0.3s ease;
            animation: spectrum-shift 8s linear infinite;
        }
        
        .search-filters button:hover::before {
            opacity: 1;
        }
        
        .search-filters button:hover {
            background-color: transparent !important;
            color: white !important;
            box-shadow: 0 0 20px rgba(71, 195, 255, 0.2);
        }

        .search-filters input::placeholder {
            color: #666;
        }
        
        /* Colorful animated underline for filter inputs - same as search bar */
        .search-filters input[type="text"],
        .search-filters input[type="number"],
        .search-filters input[type="date"] {
            position: relative;
            transition: all 0.2s ease;
            border: none !important;
            border-bottom: 1px solid var(--border) !important;
            border-radius: 0 !important;
            background-color: transparent !important;
        }
        
        .search-filters .input-wrapper {
            position: relative;
        }
        
        .search-filters .input-wrapper::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg,
                rgba(255, 71, 87, 0.8) 0%,
                rgba(255, 135, 71, 0.8) 14%,
                rgba(255, 195, 71, 0.8) 28%,
                rgba(150, 255, 71, 0.8) 42%,
                rgba(71, 255, 195, 0.8) 56%,
                rgba(71, 195, 255, 0.8) 70%,
                rgba(135, 71, 255, 0.8) 84%,
                rgba(255, 71, 87, 0.8) 100%);
            transform: scaleX(0);
            transition: transform 0.3s ease;
            animation: spectrum-shift 8s linear infinite;
        }
        
        .search-filters input[type="text"]:focus,
        .search-filters input[type="number"]:focus,
        .search-filters input[type="date"]:focus {
            outline: none;
            border-bottom-color: transparent !important;
        }
        
        .search-filters .input-wrapper:focus-within::after {
            transform: scaleX(1);
        }
        
        .search-filters input[type="text"]:hover:not(:focus),
        .search-filters input[type="number"]:hover:not(:focus),
        .search-filters input[type="date"]:hover:not(:focus) {
            border-color: var(--text-secondary);
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
        }
        
        /* Enhanced date input styles */
        input[type="date"] {
            position: relative;
        }
        
        input[type="date"]::-webkit-calendar-picker-indicator {
            background-color: var(--accent-blue);
            border-radius: 3px;
            cursor: pointer;
        }
        
        /* Style the native calendar picker (WebKit browsers) */
        input[type="date"]::-webkit-datetime-edit {
            color: var(--text-primary);
        }
        
        input[type="date"]::-webkit-datetime-edit-fields-wrapper {
            background-color: var(--dark-bg);
        }
        
        input[type="date"]::-webkit-datetime-edit-text {
            color: var(--text-secondary);
        }
        
        input[type="date"]::-webkit-datetime-edit-month-field,
        input[type="date"]::-webkit-datetime-edit-day-field,
        input[type="date"]::-webkit-datetime-edit-year-field {
            color: var(--text-primary);
        }
        
        /* Calendar popup styling (limited browser support) */
        input[type="date"]::-webkit-calendar-picker-indicator:hover {
            background-color: var(--primary-red);
        }
        
        /* Custom validation styling for out-of-range dates */
        input[type="date"]:invalid {
            border-color: var(--primary-red);
            box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.2);
        }
        
        input[type="date"]:out-of-range {
            border-color: var(--primary-red);
            background-color: rgba(255, 0, 0, 0.1);
        }
        
        /* Custom classes for enhanced date picker feedback */
        input[type="date"].date-picker-active {
            border-color: var(--accent-blue);
            box-shadow: 0 0 0 2px rgba(62, 166, 255, 0.3);
        }
        
        input[type="date"].date-out-of-range {
            border-color: var(--primary-red) !important;
            background-color: rgba(255, 0, 0, 0.1) !important;
            animation: shake 0.5s ease-in-out;
        }
        
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-5px); }
            75% { transform: translateX(5px); }
        }
        
        /* Date input with range indicator */
        .date-input-container {
            position: relative;
        }
        
        .date-range-hint {
            font-size: 0.8em;
            color: var(--text-secondary);
            margin-top: 4px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .date-input-container:hover .date-range-hint,
        .date-input-container:focus-within .date-range-hint {
            opacity: 1;
        }

        

        .search-container {
            display: flex;
            align-items: center;
            max-width: 40%;
            width: 100%;
            margin: 0 auto;
            position: relative;
            border-radius: 0;
            transition: border-color 0.2s ease;
            background-color: transparent;
            border-bottom: 1px solid var(--border);
        }
        
        @media (max-width: 768px) {
            .logo-title-container .logo img {
                height: 2em;
            }
                }
        
        @media (max-width: 480px) {
            .logo-title-container .logo img {
                height: 2em;
            }
        }

        .search-container:hover {
            box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
        }

        .search-input-group {
            display: flex;
            width: 100%;
            border-radius: 0;
            overflow: visible;
            background-color: transparent;
            transition: border-color 0.2s ease;
            position: relative;
        }
        
        /* Persistent subtle baseline for visibility */
        .search-input-group::before {
            content: '';
            position: absolute;
            bottom: -1px;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(90deg, 
                transparent 0%, 
                rgba(255, 255, 255, 0.08) 20%, 
                rgba(255, 255, 255, 0.08) 80%, 
                transparent 100%);
            transition: all 0.3s ease;
            pointer-events: none;
        }
        
        /* Luminous hover state */
        .search-input-group:hover::before {
            height: 1px;
            background: linear-gradient(90deg, 
                transparent 0%, 
                rgba(255, 255, 255, 0.2) 10%, 
                rgba(255, 255, 255, 0.2) 90%, 
                transparent 100%);
            box-shadow: 0 1px 3px rgba(255, 255, 255, 0.05);
        }

        /* Rainbow focus state */
        .search-input-group:focus-within::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg,
                rgba(255, 71, 87, 0.8) 0%,
                rgba(255, 135, 71, 0.8) 14%,
                rgba(255, 195, 71, 0.8) 28%,
                rgba(150, 255, 71, 0.8) 42%,
                rgba(71, 255, 195, 0.8) 56%,
                rgba(71, 195, 255, 0.8) 70%,
                rgba(135, 71, 255, 0.8) 84%,
                rgba(255, 71, 87, 0.8) 100%);
            transition: all 0.5s ease;
            transform: scaleX(1);
            animation: spectrum-shift 8s linear infinite;
        }
        
        /* Hide the persistent line when focused */
        .search-input-group:focus-within::before {
            opacity: 0;
        }
        
        .search-input-group::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--text-tertiary);
            transition: all 0.5s ease;
            transform: scaleX(0);
        }
        
        @keyframes spectrum-shift {
            0% { filter: hue-rotate(0deg); }
            100% { filter: hue-rotate(360deg); }
        }

        .search-input {
            flex: 1;
            background-color: transparent;
            border: none;
            padding: var(--space-md) 0;
            color: var(--text-primary);
            font-size: var(--font-size-base);
            font-weight: 300;
            outline: none;
            transition: color 0.3s ease;  /* Smooth color transition */
        }
        
        .search-input-group:hover .search-input {
            color: rgba(255, 255, 255, 0.95);  /* Slightly brighter on hover */
        }

        .search-input::placeholder {
            color: var(--text-tertiary);
            font-weight: 300;
            transition: color 0.3s ease;
        }
        
        .search-input-group:hover .search-input::placeholder {
            color: rgba(255, 255, 255, 0.3);  /* More visible placeholder on hover */
        }

        .search-button {
            background-color: transparent;
            border: none;
            width: var(--space-xl);
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: color 0.2s ease;
            flex-shrink: 0;
            padding: 0;
        }

        .search-button:hover {
            color: var(--text-primary);
        }

        .search-button:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            transform: none;
        }
        
        .search-button svg {
            width: 28px;
            height: 28px;
            fill: currentColor;
        }

        /* Contracted header styles */
        .header-contracted .search-container {
            max-width: 500px;
            background-color: #121212;
        }

        .header-contracted .search-input {
            padding: 12px 20px;
            font-size: 16px;
        }

        .header-contracted .search-button {
            width: 60px;
        }

        .header-contracted .search-button svg {
            width: 24px;
            height: 24px;
        }

        .main-content {
            padding: 24px 16px; /* Reduced side padding on mobile */
            min-height: calc(100vh - 100px);
        }
        @media (max-width: 768px) {
            .main-content {
                padding: 16px 12px; /* Even less padding on mobile */
            }
        }

        .loading-container {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 300px;
            gap: 16px;
        }

        .loading-circle {
            width: 80px;
            height: 80px;
            position: relative;
        }

        .loading-spinner {
            width: 100%;
            height: 100%;
            border: 4px solid var(--dark-surface-3);
            border-top: 4px solid var(--primary-red);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        .loading-progress {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            background: conic-gradient(var(--primary-red) 0deg, var(--primary-red) 0deg, transparent 0deg, transparent 360deg);
            transition: background 0.3s ease;
        }

        .loading-count {
            font-size: 16px;
            font-weight: 500;
            margin-top: 8px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        @keyframes fadeIn {
            0% { opacity: 0; transform: translateY(-10px); }
            100% { opacity: 1; transform: translateY(0); }
        }

        @keyframes fadeInUp {
            0% {
                opacity: 0;
                transform: translateY(30px);
            }
            100% {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes float {
            0% {
                transform: translateY(0px);
            }
            50% {
                transform: translateY(-10px);
            }
            100% {
                transform: translateY(0px);
            }
        }

        .loading-text {
            color: var(--text-secondary);
            font-size: 16px;
        }

        .timeline-container {
            display: none;
            position: sticky;
            top: var(--header-height, 80px); /* Dynamic header height */
            padding: 1em 1em;
            z-index: 99;
            background: var(--dark-bg);
        }
        
        /* Mobile timeline positioning */
        @media (max-width: 768px) {
            .timeline-container 
            {
                padding-bottom: 1em !important;
            }
        }

        @media (orientation: landscape)
        {
            .timeline-container 
            {
                padding: 1em 1em !important;
            }
        }
        .kofi-floating-chat {
            z-index: 1000 !important;
            bottom: 70px !important; /* Raise it above the search bar */
        }
        /* Adjust for mobile browsers with address bar */
        @media (max-width: 768px) {
            .kofi-floating-chat {
                bottom: 100px !important; /* Even higher on mobile to avoid address bar */
            }
        }

        .timeline-header {
            display: flex;
            align-items: center;
            gap: 24px;
            background: var(--dark-bg);
        }

        .channel-info {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-shrink: 0;
        }

        .channel-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
        }

        .channel-name {
            font-size: 18px;
            font-weight: 500;
        }

        .video-count {
            color: var(--text-secondary);
            font-size: 14px;
        }

        .timeline-wrapper {
            flex-grow: 1;
        }

        .timeline {
            position: relative;
            height: 80px;  /* Reduced height for cleaner look */
            background: linear-gradient(to right, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
            margin: var(--space-md) 0;
            cursor: crosshair;  /* More precise cursor */
            /* Add subtle grid lines */
            background-image: 
                linear-gradient(to right, var(--bg-secondary) 0%, var(--bg-tertiary) 100%),
                repeating-linear-gradient(
                    90deg,
                    transparent,
                    transparent calc(100% / 12 - 1px),
                    var(--border) calc(100% / 12 - 1px),
                    var(--border) calc(100% / 12)
                );
            background-size: 100% 100%, 100% 100%;
            border-radius: 10px;
            border: 1px solid var(--border-light);
        }

        .timeline-ruler {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 100%;
            display: flex;
            align-items: center;
        }

        .timeline-track {
            height: 1px;  /* Thin line instead of thick bar */
            background: var(--text-tertiary);
            border-radius: 0;
            position: relative;
            margin: 0 var(--space-lg);
            flex: 1;
            opacity: 0.5;
        }
        
        .timeline-thumb {
            position: absolute;
            top: 50%;
            left: 0px;
            transform: translate(-50%, -50%);
            width: 2px;  /* Thin vertical line */
            height: 100%;  /* Full height */
            background-color: var(--text-primary);
            border-radius: 0;
            cursor: ew-resize;  /* East-west resize cursor */
            transition: background-color 0.2s ease;  /* Smooth color transition */
            z-index: 2;
        }
        
        .timeline-thumb::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 12px;
            height: 12px;
            background-color: var(--text-primary);
            border: 2px solid var(--bg-primary);
            border-radius: 0;  /* Square handle */
            transition: background-color 0.2s ease;
        }
        
        .timeline-thumb:hover::before {
            background-color: var(--accent);  /* White on hover */
        }
        
        .timeline-thumb:active {
            cursor: grabbing;
            transform: translate(-50%, -50%) scale(1.1);
            background-color: var(--accent-hover);
        }
        
        .timeline-thumb:active::before {
            background-color: var(--accent-hover);
        }

        .timeline-marks {
            position: absolute;
            top: 0;
            left: 20px;
            right: 20px;
            height: 100%;
            pointer-events: none;
        }

        .timeline-mark {
            position: absolute;
            background-color: #666;
            pointer-events: none;
        }

        .timeline-mark.major {
            width: 2px;
            height: 20px;
            top: 40px;
        }

        .timeline-mark.minor {
            width: 1px;
            height: 10px;
            top: 45px;
        }

        .timeline-mark-label {
            position: absolute;
            font-size: 12px;
            color: var(--text-secondary);
            top: 48px;
            transform: translateX(-50%);
            white-space: nowrap;
            user-select: none;
        }

        .timeline-labels {
            display: flex;
            justify-content: space-between;
            margin-top: 8px;
            font-size: 12px;
            color: var(--text-secondary);
        }

        .videos-grid {
            display: none;
            grid-template-columns: repeat(auto-fill, minmax(calc(var(--video-card-base-width) * var(--video-card-scale)), 1fr));
            gap: calc(16px * var(--video-card-scale));
            padding-top: 24px; /* Add padding to avoid content being hidden behind sticky timeline */
        }
        
        /* List view styles - Multi-column list like Windows Explorer */
        .videos-grid.view-list {
            display: grid !important;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 0;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 8px;
            overflow: auto;
            grid-auto-flow: row;
            padding: 0;
        }
        
        .videos-grid.view-list .video-card {
            display: flex;
            flex-direction: row;
            align-items: center;
            padding: 8px 12px;
            border: none;
            border-radius: 0;
            border-right: 1px solid rgba(255, 255, 255, 0.05);
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            background: transparent;
            cursor: pointer;
            transition: background-color 0.2s ease;
            position: relative;
            min-height: 40px;
            margin: 0;
        }
        
        /* Remove borders for edge items */
        .videos-grid.view-list .video-card:nth-child(2n) {
            border-right: none;
        }
        
        /* Responsive column count based on viewport width */
        @media (min-width: 900px) {
            .videos-grid.view-list {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .videos-grid.view-list .video-card:nth-child(2n) {
                border-right: none;
            }
            
            .videos-grid.view-list .video-card:nth-child(2n-1) {
                border-right: 1px solid rgba(255, 255, 255, 0.05);
            }
        }
        
        @media (min-width: 1400px) {
            .videos-grid.view-list {
                grid-template-columns: repeat(3, 1fr);
            }
            
            .videos-grid.view-list .video-card:nth-child(2n) {
                border-right: 1px solid rgba(255, 255, 255, 0.05);
            }
            
            .videos-grid.view-list .video-card:nth-child(3n) {
                border-right: none;
            }
        }
        
        @media (min-width: 1800px) {
            .videos-grid.view-list {
                grid-template-columns: repeat(4, 1fr);
            }
            
            .videos-grid.view-list .video-card:nth-child(3n) {
                border-right: 1px solid rgba(255, 255, 255, 0.05);
            }
            
            .videos-grid.view-list .video-card:nth-child(4n) {
                border-right: none;
            }
        }
        
        @media (max-width: 899px) {
            .videos-grid.view-list {
                grid-template-columns: 1fr;
            }
            
            .videos-grid.view-list .video-card {
                border-right: none;
                border-bottom: 1px solid var(--border);
            }
            
            .videos-grid.view-list .video-card:last-child {
                border-bottom: none;
            }
        }
        
        .videos-grid.view-list .video-card:hover {
            background: rgba(255, 255, 255, 0.05);
        }
        
        .videos-grid.view-list .video-card-highlighted {
            background: rgba(74, 158, 255, 0.2) !important;
        }
        
        /* Hide thumbnail container in list view */
        .videos-grid.view-list .video-thumbnail-container {
            display: none;
        }
        
        /* Replace with simple play icon */
        .videos-grid.view-list .video-card::before {
            content: '▶';
            font-size: 12px;
            color: var(--text-secondary);
            margin-right: 12px;
            opacity: 0.7;
            flex-shrink: 0;
        }
        
        .videos-grid.view-list .video-info {
            display: flex;
            align-items: center;
            padding: 0;
            width: 100%;
            min-width: 0; /* Allow text truncation */
        }
        
        .videos-grid.view-list .video-title {
            font-size: 13px;
            font-weight: 400;
            margin: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            -webkit-line-clamp: unset;
            line-clamp: unset;
            flex: 1;
            min-width: 0;
        }
        
        /* Hide meta in list view - will show in tooltip */
        .videos-grid.view-list .video-meta {
            display: none;
        }
        
        /* Tooltip for list view */
        .video-tooltip {
            position: absolute;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-light);
            border-radius: 6px;
            padding: 8px 12px;
            font-size: 12px;
            color: var(--text-secondary);
            white-space: nowrap;
            z-index: 10;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.2s ease;
            top: 100%;
            left: 30px;
            margin-top: 4px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }
        
        .videos-grid.view-list .video-card:hover .video-tooltip {
            opacity: 1;
        }
        
        /* Details view styles - Table-like view similar to Windows Explorer details */
        .videos-grid.view-details {
            display: table;
            width: 100%;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 8px;
            overflow: hidden;
            border-collapse: separate;
            border-spacing: 0;
        }
        
        .details-header {
            display: table-row;
            background: var(--bg-tertiary);
            font-weight: 500;
            position: sticky;
            top: 0;
            z-index: 1;
            border-bottom: 2px solid var(--border);
        }
        
        .details-header span {
            display: table-cell;
            padding: 10px 12px;
            color: var(--text-secondary);
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            border-right: 1px solid var(--border);
            border-bottom: 2px solid var(--border);
        }
        
        .details-header span:last-child {
            border-right: none;
        }
        
        .details-header span:nth-child(1) { width: 40%; padding-left: 32px; }
        .details-header span:nth-child(2) { width: 15%; }
        .details-header span:nth-child(3) { width: 10%; }
        .details-header span:nth-child(4) { width: 15%; }
        .details-header span:nth-child(5) { width: 20%; }
        
        .videos-grid.view-details .video-card {
            display: table-row;
            border: none;
            border-radius: 0;
            background: transparent;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }
        
        .videos-grid.view-details .video-card:last-child {
            border-bottom: none;
        }
        
        .videos-grid.view-details .video-card:hover {
            background: rgba(255, 255, 255, 0.03);
        }
        
        .videos-grid.view-details .video-card-highlighted {
            background: rgba(74, 158, 255, 0.15) !important;
        }
        
        /* Hide thumbnail container in details view */
        .videos-grid.view-details .video-thumbnail-container {
            display: none;
        }
        
        .videos-grid.view-details .video-info {
            display: contents;
        }
        
        /* Individual cells in details view */
        .videos-grid.view-details .video-title,
        .videos-grid.view-details .video-date,
        .videos-grid.view-details .video-duration,
        .videos-grid.view-details .video-views,
        .videos-grid.view-details .video-age {
            display: table-cell;
            padding: 10px 12px;
            font-size: 13px;
            border-right: 1px solid rgba(255, 255, 255, 0.05);
            border-bottom: 1px solid var(--border);
        }
        
        .videos-grid.view-details .video-title { width: 40%; }
        .videos-grid.view-details .video-date { width: 15%; }
        .videos-grid.view-details .video-duration { width: 10%; }
        .videos-grid.view-details .video-views { width: 15%; }
        .videos-grid.view-details .video-age { width: 20%; }
        
        .videos-grid.view-details .video-title {
            font-weight: 400;
            color: var(--text-primary);
            max-width: 400px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            position: relative;
            padding-left: 32px;
        }
        
        /* Play icon for details view */
        .videos-grid.view-details .video-title::before {
            content: '▶';
            position: absolute;
            left: 12px;
            font-size: 12px;
            color: var(--text-secondary);
            opacity: 0.8;
        }
        
        .videos-grid.view-details .video-meta {
            display: none; /* Hide original meta container */
        }
        
        .videos-grid.view-details .video-date,
        .videos-grid.view-details .video-duration,
        .videos-grid.view-details .video-views,
        .videos-grid.view-details .video-age {
            color: var(--text-secondary);
            font-size: 12px;
        }
        
        .videos-grid.view-details .video-age:last-child {
            border-right: none;
        }
        
        /* Disable card size slider when not in grid view */
        .card-size-container.disabled {
            opacity: 0.4;
            pointer-events: none;
        }
        
        .card-size-container.disabled .card-size-slider {
            cursor: not-allowed;
        }
        
        /* Mobile adjustments for list and details views */
        @media (max-width: 768px) {
            .videos-grid.view-list .video-info {
                flex-direction: column;
                align-items: start;
                gap: 4px;
            }
            
            .videos-grid.view-list .video-meta {
                font-size: 11px;
            }
            
            /* On mobile, details view becomes similar to list view */
            .videos-grid.view-details {
                display: flex;
                flex-direction: column;
            }
            
            .details-header {
                display: none;
            }
            
            .videos-grid.view-details .video-card {
                display: flex;
                flex-direction: column;
                padding: 8px 12px;
                border-bottom: 1px solid var(--border);
            }
            
            .videos-grid.view-details .video-info {
                display: flex;
                flex-direction: column;
                gap: 4px;
            }
            
            .videos-grid.view-details .video-title,
            .videos-grid.view-details .video-date,
            .videos-grid.view-details .video-duration,
            .videos-grid.view-details .video-views,
            .videos-grid.view-details .video-age {
                display: block;
                padding: 2px 0;
                border: none;
                font-size: 12px;
            }
            
            .videos-grid.view-details .video-title {
                padding-left: 20px;
                max-width: 100%;
            }
        }

        @media (max-width: 768px) {
            body {
                padding-bottom: 40px; /* More padding on mobile */
            }
        }
            .timeline-container {
                padding-bottom: 1vh;
            }
            .timeline-labels {
                padding: 0px 1em;
            }


            .timeline-header {
                justify-content: center; /* Center the timeline when channel info is hidden */
            }

            .timeline {
                height: 70px; /* Thinner timeline in portrait mode */
            }

            .timeline-mark.major {
                top: 25px;
            }

            .timeline-mark.minor {
                top: 30px;
            }

            .timeline-thumb {
                height: 40px;
            }

            .videos-grid {
                gap: 8px;
            }
            
            /* Very small screens */
            @media (max-width: 480px) {
                .timeline-mark-label {
                    font-size: 10px;
                }
                
                .timeline-labels {
                    font-size: 10px;
                    padding: 0px 0.5em;
                }
            }
    
        .video-card {
            border-radius: 10px;
            overflow: hidden;
            position: relative;
            border: 1px solid var(--border-light);
        }

        .video-card-highlighted {
            border: 1px solid var(--accent-blue);
            box-shadow: 0 0 20px rgba(62, 166, 255, 0.9);
            transform: scale(1.02);
        }

        .video-thumbnail {
            width: 100%;
            aspect-ratio: 16/9;
            object-fit: cover;
        }

        .video-info {
            padding: 16px;
        }

        .video-title {
            font-size: 16px;
            font-weight: 500;
            line-height: 1.4;
            margin-bottom: 8px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .video-meta {
            font-size: 13px;
            color: var(--text-secondary);
            display: flex;
            gap: 12px;
            align-items: center;
        }

        .error-message {
            background-color: #cc0000;
            color: var(--text-primary);
            padding: 16px;
            border-radius: 8px;
            margin: 16px 0;
            display: none;
        }

        .placeholder {
            text-align: center;
            color: var(--text-secondary);
            padding: 48px 24px;
            max-width: 600px;
            margin: 0 auto;
        }

        .placeholder h2 {
            font-size: 28px;
            margin-bottom: 16px;
            color: var(--text-primary);
        }

        .placeholder p {
            font-size: 18px;
            line-height: 1.6;
        }

        .video-embed {
            width: 100%;
            height: 100%;
            border: none;
        }

        .video-thumbnail-container {
            position: relative;
            width: 100%;
            aspect-ratio: 16/9;
            cursor: pointer;
            background-color: #000;
        }

        .video-play-overlay {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 68px;
            height: 48px;
            background-color: rgba(0, 0, 0, 0.8);
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            pointer-events: none;
        }

        .video-thumbnail-container:hover .video-play-overlay {
            background-color: rgba(255, 0, 0, 0.9);
            transform: translate(-50%, -50%) scale(1.15);
        }

        .video-play-icon {
            width: 0;
            height: 0;
            border-left: 24px solid var(--text-primary);
            border-top: 14px solid transparent;
            border-bottom: 14px solid transparent;
            margin-left: 5px;
        }

        .video-card.playing {
            background-color: #1a1a1a;
        }

        .video-card.playing:hover {
            transform: none;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }