:root {
            --primary-red: #ff0000;
            --dark-bg: #1b1b1b;
            --dark-surface-1: #212121;
            --dark-surface-2: #2a2a2a;
            --dark-surface-3: #333;
            --text-primary: #fff;
            --text-secondary: #aaa;
            --accent-blue: #3ea6ff;
        }

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

        body {
            font-family: 'Roboto', Arial, sans-serif;
            background-color: var(--dark-bg);
            color: var(--text-primary);
            line-height: 1.4;
            overflow: hidden; /* Prevent scrolling on initial load */
            overflow-x: hidden; /* Prevent horizontal scrolling */
            padding-bottom: 20px; /* Add padding at bottom for mobile */
            max-width: 100vw;
        }

        .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: all 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: var(--dark-surface-1);
            border-radius: 50px;
            padding: 8px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            margin-top: 40px;
            transition: all 0.3s ease;
        }

        .landing-search-container:hover {
            box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
            transform: translateY(-2px);
        }

        @media (max-width: 768px) {
            .header {
                height: auto;
                min-height: 70px;
                background-color: var(--dark-bg);
                padding: 10px 16px;
                overflow-x: hidden;
            }
            .timeline-thumb {
                width: 25px !important;
            }
            .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;
        }

        .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: 3.5rem;
            font-weight: 700;
            margin-bottom: 20px;
            line-height: 1.1;
            letter-spacing: -0.03em;
            color: var(--text-primary);
        }

        .hero-text p {
            font-size: 1.4rem;
            color: var(--text-secondary);
            line-height: 1.6;
            margin-top: 0;
        }

        .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));
            animation: float 3s ease-in-out infinite;
        }

        .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: 1em 1em; /* 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 */
                }

                .timeline-thumb {
                    width: 25px !important;
            }
            }
            
            .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 */
            }
            .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: 60px !important; /* Match the contracted header height on mobile */
                padding: 0px 0px;
                border-radius: 4px;
                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));
            animation: float 3s ease-in-out infinite;
        }
        
        /* 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 {
            color: var(--primary-red);
            font-weight: 700;
            font-size: 1.2rem;
            margin-left: 8px;
        }
        /* 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-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;
        }

        .footer-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);
        }

        /* 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: block !important;
                padding: 1rem;
                justify-content: flex-start !important;
                align-items: stretch !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: column;
                gap: 10px;
                align-items: stretch;
            }
            
            .header-content .search-container {
                max-width: 100%;
                width: 100%;
                margin: 0;
            }
            
            .header-content .logo {
                align-self: center;
                margin-right: 0;
            }
        }

        .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 {
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
            border: 1px solid #313131;
            background-color: var(--dark-bg) !important;
        }
        
        .search-filters input, .search-filters button {
            font-family: 'Roboto', Arial, sans-serif;
        }

        .search-filters input::placeholder {
            color: #666;
        }
        
        /* 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: 90%;
            width: 100%;
            margin: 0 auto;
            position: relative;
            border-radius: 50px;
            transition: all 0.3s ease;
            background-color: #121212;
            border: 1px solid var(--dark-surface-3);
        }
        
        @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: 50px;
            overflow: hidden;
            background-color: #121212;
            transition: all 0.3s ease;
        }

        .search-input-group:focus-within {
            box-shadow: 0 0 0 2px var(--accent-blue);
        }

        .search-input {
            flex: 1;
            background-color: transparent;
            border: none;
            padding: 16px 24px;
            color: var(--text-primary);
            font-size: 1em;
            outline: none;
            transition: all 0.2s;
        }

        .search-input::placeholder {
            color: #666;
        }

        .search-button {
            background-color: var(--primary-red);
            border: none;
            width: 70px;
            color: var(--text-primary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            flex-shrink: 0;
        }

        .search-button:hover {
            background-color: #ff3333;
            transform: scale(1.03);
        }

        .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: 80px; /* Height of the contracted header */
            padding: 1em 1em;
            z-index: 99;
            background: var(--dark-bg);
        }
        
        /* Mobile timeline positioning */
        @media (max-width: 768px) {
            .timeline-container 
            {
                padding: 5em 1em !important;
                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: 100px;
            border: 1px solid #313131;
            background: var(--dark-bg);
            border-radius: 8px;
            margin: 0;
            cursor: pointer;
        }

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

        .timeline-track {
            height: 8px;
            background: linear-gradient(90deg, var(--primary-red) 0%, #ff4444 100%);
            border-radius: 4px;
            position: relative;
            margin: 0 20px;
            flex: 1;
        }
        
        .timeline-thumb {
            position: absolute;
            top: 50%;
            opacity: 90%;
            left: 0px;
            transform: translate(-50%, -50%);
            width: 20px;
            height: 60px;
            background-color: var(--text-primary);
            border-radius: 5%;
            cursor: grab;
            box-shadow: 0 2px 8px rgba(0,0,0,0.5);
            transition: left 0.1s ease, transform 0.1s ease;
        }
        
        .timeline-thumb:active {
            cursor: grabbing;
            transform: translate(-50%, -50%) scale(1.1);
        }

        .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(240px, 1fr));
            gap: 16px;
            padding-top: 24px; /* Add padding to avoid content being hidden behind sticky timeline */
        }

        @media (max-width: 768px) {
            body {
                padding-bottom: 40px; /* More padding on mobile */
            }
        }
            .timeline-container {
                border-radius: 4px;
                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 {
            background-color: var(--dark-bg);
            border-radius: 12px;
            overflow: hidden;
            transition: transform 0.2s, box-shadow 0.2s, border 0.2s;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            border: 1px solid #313131;
        }

        .video-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 6px 16px rgba(0,0,0,0.2);
        }

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

        .video-thumbnail {
            width: 100%;
            aspect-ratio: 16/9;
            object-fit: cover;
            border-bottom: 1px solid var(--dark-surface-3);
        }

        .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);
        }