/* Modern CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-header: #EEF2FF;
    /* Pure White */
    --bg-body: #f1f5f9;
    /* Slate 100 */
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Navigation */
.navbar {
    background: var(--bg-primary);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}



.nav-brand a {
    font-size: 1.875rem;
    font-weight: 700;
    color: #000000;
    text-decoration: none;
    transition: var(--transition);
}

.nav-brand a:hover {
    color: #333333;
}

.be-flag {
    background: linear-gradient(to right,
            #000000 0%, #000000 33.33%,
            #FFCD00 33.33%, #FFCD00 66.66%,
            #C8102E 66.66%, #C8102E 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    /* Subtle shadow to help the black part pop against dark backgrounds */
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Dropdown Navigation */
.nav-item-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-dropdown-trigger::after {
    display: none !important;
}

.dropdown-arrow {
    transition: transform 0.2s ease;
}

.nav-item-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Simple Dropdown Menu (for Explorer) */
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-primary);
    border-radius: 0.75rem;
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.25);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    min-width: 160px;
    border: 1px solid var(--border-color);
    list-style: none;
}

.nav-item-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu li a {
    display: block;
    padding: 0.6rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-dropdown-menu li a:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-primary);
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    min-width: 700px;
    border: 1px solid var(--border-color);
}

.nav-item-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.mega-menu-column {
    min-width: 0;
}

.mega-menu-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mega-menu-title .region-emoji {
    font-size: 1.1rem;
}

.mega-menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mega-menu-list li a {
    display: block;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mega-menu-list li a::after {
    display: none !important;
}

.mega-menu-list li a:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.mega-menu-more a {
    color: var(--primary-color) !important;
    font-weight: 500 !important;
    font-style: italic;
}

.mega-menu-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.mega-menu-all-link {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white !important;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 2rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mega-menu-all-link::after {
    display: none !important;
}

.mega-menu-all-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Main Content */
.main-content {
    flex: 1;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #6366f1 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.hero-description {
    font-size: 1.25rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    margin-top: 1rem;
}

.hero-badge:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.3);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #6366f1 100%);
    padding: 4rem 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.page-header p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
}

/* Content Section */
.content-section {
    padding: 3rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.content-text h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.content-text p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.placeholder-image {
    background: var(--bg-secondary);
    border-radius: 1rem;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.contact-form-container h2,
.contact-info h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background-color: var(--bg-primary);
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") no-repeat right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.info-item {
    margin-bottom: 2rem;
}

.info-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.info-item p {
    color: var(--text-secondary);
}

/* Error Section */
.error-section {
    padding: 6rem 0;
    text-align: center;
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Content Sections */
.section-block {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 1.75rem;
    background: linear-gradient(180deg, #7c3aed 0%, #4f46e5 100%);
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.5);
}

/* Videos Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.videos-grid-featured {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.video-card {
    background: var(--bg-primary);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 2px solid transparent;
    /* default border, color set via inline style */
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.video-card-featured {
    box-shadow: 0 0 12px 2px rgba(99, 102, 241, 0.4);
}

.video-card-featured:hover {
    box-shadow: 0 0 18px 4px rgba(99, 102, 241, 0.5);
}

.video-thumbnail {
    position: relative;
    display: block;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 aspect ratio */
    background: #000;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-thumbnail.is-letterboxed img {
    object-fit: cover;
}

/* Aspect Ratio Handling for 4:3 Content */
/* Pillarbox: 4:3 full image - show with black bars on left/right (contain) */
.video-thumbnail.pillarbox img {
    object-fit: contain;
    background: #000;
}

/* Letterboxed: 4:3 with black bars - zoom/crop to remove top/bottom bars */
.video-thumbnail.letterboxed img {
    object-fit: cover;
    /* Scale up slightly to crop the letterbox bars (reduced for 16:9 content) */
    /*transform: scale(1.15);*/
}





.video-duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.featured-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.video-info {
    padding: 1rem;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.video-title-text {
    white-space: nowrap;
    position: relative;
    display: inline-block;
    /* Expands to full text width */
    /* No overflow: hidden here - let parent clip */
}

.video-title {
    overflow: hidden;
    /* Clips the expanded child */
    max-width: 100%;
    /* Ensure it doesn't expand beyond card */
}

.video-title-text a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition);
    display: inline-block;
}

.video-title-text.is-truncated:hover a {
    color: var(--primary-color);
    animation: scroll-text 4s linear infinite;
    animation-delay: 0.5s;
}

/* For plain text without links (e.g., related videos section) */
.video-title-text:not(:has(a)) {
    display: inline-block;
    color: var(--text-primary);
    width: max-content;
    /* Allow text to expand to full width */
}

.video-title-text:not(:has(a)).is-truncated:hover {
    color: var(--primary-color);
    animation: scroll-text 4s linear infinite;
    animation-delay: 0.5s;
}

@keyframes scroll-text {

    0%,
    10% {
        transform: translateX(0);
    }

    45%,
    55% {
        transform: translateX(calc(-100% + 80px));
        /* Scroll to reveal end of text */
    }

    90%,
    100% {
        transform: translateX(0);
    }
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.video-channel {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.video-channel a,
.weather-channel a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.video-channel a:hover,
.weather-channel a:hover {
    color: var(--primary-color);
}

.video-year {
    font-weight: 600;
    color: var(--text-primary);
}

/* Video Types Badge Base Style */
.video-type {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    color: white;
    /* background set via inline style */
    vertical-align: middle;
    /* Enforce single line and sizing */
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
    /* Adjust as needed */
    text-align: center;
    position: relative;
    line-height: 1.2;
}

.video-type span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.video-type.is-truncated:hover span {
    animation: scroll-type 3s linear infinite;
}

@keyframes scroll-type {
    0% {
        transform: translateX(0);
    }

    30% {
        transform: translateX(0);
    }

    /* Pause a bit */
    100% {
        transform: translateX(-100%);
    }

    /* Scroll left */
}

.video-type-separator {
    color: var(--text-secondary);
    margin: 0 0.25rem;
    font-weight: 300;
}

/* Webmaster Selection */
.webmaster-selection {
    display: flex;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}

/* Theme Card */
.theme-card {
    background: var(--bg-primary);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}

.themes-list .theme-card:last-child {
    margin-bottom: 0;
}

.theme-content {
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    gap: 2rem;
    align-items: center;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.theme-thumbnail {
    width: 100%;
    padding-top: 56.25%;
    position: relative;
    background: var(--bg-secondary);
    overflow: hidden;
    border: 3px solid var(--primary-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.theme-thumbnail:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.theme-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.theme-info {
    padding: 1rem 0;
    text-align: center;
}

.theme-info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.theme-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

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

.theme-info p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.theme-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    justify-content: center;
    /* Center align meta items */
}

/* Weather Grid */
.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.weather-card {
    background: var(--bg-primary);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.weather-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.weather-thumbnail {
    position: relative;
    display: block;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 aspect ratio */
    background: #000;
    overflow: hidden;
}

.weather-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.weather-thumbnail.is-letterboxed img {
    object-fit: cover;
}

.weather-info {
    padding: 1rem;
}

.weather-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.weather-title-text {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.weather-title-text a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition);
    display: inline-block;
}

.weather-title-text:hover a {
    color: var(--primary-color);
    animation: scroll-text 4s linear infinite;
    animation-delay: 0.5s;
}

.weather-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.weather-channel {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.weather-year {
    font-weight: 600;
    color: var(--text-primary);
}

/* Video Page */
.video-page {
    padding: 2rem 0;
}

.video-player-section {
    margin-bottom: 2rem;
}

.video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.video-player {
    width: 100%;
    height: auto;
    display: block;
    max-height: 80vh;
}

.video-info-section {
    background: var(--bg-primary);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.video-header {
    margin-bottom: 2rem;
}

.video-page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.video-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.video-stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.video-description {
    margin-bottom: 2rem;
}

.video-description h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.video-description p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.video-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item strong {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    color: var(--text-secondary);
    font-size: 1rem;
}

.channel-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.channel-link:hover {
    opacity: 0.8;
}

/* Video Share Buttons */
.video-share {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.video-share h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    color: white;
}

.share-btn svg {
    flex-shrink: 0;
}

.share-x {
    background: #000000;
}

.share-x:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.share-whatsapp {
    background: #25D366;
}

.share-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.3);
}

.share-facebook {
    background: #1877F2;
}

.share-facebook:hover {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(24, 119, 242, 0.3);
}

.share-linkedin {
    background: #0077B5;
}

.share-linkedin:hover {
    background: #006399;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 119, 181, 0.3);
}

.share-copy {
    background: var(--text-secondary);
}

.share-copy:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Same Channel Section */
.same-channel-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.same-channel-section .section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .content-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .videos-grid,
    .videos-grid-featured,
    .weather-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .theme-content {
        grid-template-columns: 1fr;
    }

    .theme-thumbnail {
        padding-top: 56.25%;
    }

    .video-page-title {
        font-size: 1.5rem;
    }

    .video-stats {
        flex-direction: column;
        gap: 0.75rem;
    }

    .video-details {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Channel Page Header */
.channel-header-block {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.channel-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.channel-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.channel-info h2 {
    margin-bottom: 0;
    font-size: 2rem;
    border-bottom: none;
    padding-bottom: 0;
}

.channel-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.badge-video-count {
    background: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

/* Year Badge in Thumbnail */
.year-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #007bff;
    /* Blue badge */
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Hero Channel Layout */
.hero-channel-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: center;
    text-align: left;
}

.hero-logo-container {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.hero-channel-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
}

/* Autoplay Toggle Switch */
.autoplay-control {
    display: flex;
    align-items: center;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    margin-right: 12px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: #6366f1;
}

input:focus+.toggle-slider {
    box-shadow: 0 0 1px #6366f1;
}

input:checked+.toggle-slider:before {
    transform: translateX(22px);
}

/* Autoplay Countdown Overlay */
.autoplay-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.autoplay-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.autoplay-countdown {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #6366f1;
}

.autoplay-btn {
    padding: 0.75rem 2rem;
    background: white;
    color: black;
    border: none;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.autoplay-btn:hover {
    transform: scale(1.05);
}



.hero-text-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hero-text-content .hero-title {
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-flag {
    font-size: 0.8em;
}

.hero-stats {
    margin-top: 0.5rem;
}

.badge-hero {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .hero-channel-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .hero-text-content .hero-title {
        justify-content: center;
    }
}

/* Channel Hero Section - Premium Design */
.channel-hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #6366f1 100%);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.channel-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.channel-hero-content {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

.channel-hero-logo {
    width: 120px;
    height: 120px;
    border-radius: 1.25rem;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(255, 255, 255, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    padding: 0.75rem;
}

.channel-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0.75rem;
}

.channel-hero-logo-placeholder {
    background: white;
}

.channel-hero-logo-placeholder span {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
}

.channel-hero-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.channel-hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.channel-hero-flag {
    font-size: 0.75em;
}

.channel-hero-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.channel-hero-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

@media (max-width: 768px) {
    .channel-hero {
        padding: 2rem 0;
    }

    .channel-hero-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .channel-hero-logo {
        width: 100px;
        height: 100px;
    }

    .channel-hero-title {
        font-size: 2rem;
        justify-content: center;
    }

    .channel-hero-meta {
        justify-content: center;
    }
}

/* Theme Hero Section - Matching Channel Hero */
.theme-hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #6366f1 100%);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.theme-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.theme-hero-content {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

.theme-hero-image {
    width: 200px;
    height: 112px;
    border-radius: 0.75rem;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(255, 255, 255, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.2);
}

.theme-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.theme-hero-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.theme-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.theme-hero-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    line-height: 1.5;
    max-width: 600px;
    margin: 0;
}

.theme-hero-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-hero-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

@media (max-width: 768px) {
    .theme-hero {
        padding: 2rem 0;
    }

    .theme-hero-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .theme-hero-image {
        width: 160px;
        height: 90px;
    }

    .theme-hero-title {
        font-size: 1.75rem;
    }

    .theme-hero-meta {
        justify-content: center;
    }
}

/* Video Page - Related Videos Row */
.videos-row {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 1rem;
}

.videos-row .video-card .video-thumbnail {
    padding-top: 56.25%;
    /* Keep aspect ratio */
}

.videos-row .video-info {
    padding: 0.5rem;
}

.videos-row .video-title {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    overflow: hidden;
    /* Ensure clipping for marquee */
}

.videos-row .video-meta {
    font-size: 0.75rem;
    flex-wrap: wrap;
}

/* Responsive reduction for the row */
@media (max-width: 1200px) {
    .videos-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .videos-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Pagination */
/* Pagination */
.pagination-container {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.pagination-container .pagination {
    margin: 0;
    padding: 0;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.page-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.page-item.active .page-link,
.page-link.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-item.disabled .page-link {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.page-item.dots .page-link {
    border: none;
    background: transparent;
    cursor: default;
}

.page-item.dots .page-link:hover {
    transform: none;
    box-shadow: none;
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .pagination {
        gap: 0.25rem;
    }

    .page-link {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }
}

/* ========================================
   Channels Page Styles
   ======================================== */

.channels-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    position: relative;
    z-index: 1;
}

.channels-page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
}

.channels-region {
    scroll-margin-top: 80px;
}

.channels-region .section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.channels-region .section-title .region-emoji {
    font-size: 1.5rem;
}

.channels-region .section-title .region-count {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    margin-left: auto;
}

.region-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.channel-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.channel-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.channel-card-logo {
    width: 50px;
    height: 50px;
    border-radius: 0.5rem;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.channel-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

.channel-card-placeholder {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.channel-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.channel-card-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-card-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.channel-card-flag {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Mega Menu Mobile Styles */
@media (max-width: 768px) {
    .mega-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        transform: none;
        border-radius: 0;
        min-width: 100%;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .nav-item-dropdown:hover .mega-menu {
        transform: none;
    }

    .mega-menu-container {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .channels-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .mega-menu-container {
        grid-template-columns: 1fr;
    }

    .channels-page-title {
        font-size: 1.75rem;
    }
}

/* ========================================
   Channels Search Box
   ======================================== */

.channels-search-wrapper {
    margin: 1.5rem auto 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
    max-width: 500px;
}

.channels-search-input {
    flex: 1;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    border: none;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.channels-search-input:focus {
    background: white;
    color: var(--text-primary);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.channels-search-input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.channels-search-input:focus::placeholder {
    color: var(--text-secondary);
}

.channels-search-results {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

.channels-no-results {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-primary);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.channels-no-results p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 0;
}

.channels-no-results span {
    color: var(--text-primary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .channels-search-wrapper {
        flex-direction: column;
        align-items: stretch;
        max-width: 100%;
    }

    .channels-search-results {
        text-align: center;
    }
}

/* Region Navigation */
.region-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.region-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 2rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.region-nav-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 480px) {
    .region-nav {
        gap: 0.5rem;
    }

    .region-nav-link {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
}

/* ========================================
   Video Filter Controls (Channel Page)
   ======================================== */

.video-filter-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-primary);
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.video-search-form {
    flex: 1;
    min-width: 280px;
    display: flex;
    gap: 0.5rem;
}

.video-search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
    outline: none;
}

.video-search-input:focus {
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.video-search-button {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-search-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.video-sort-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.sort-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sort-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.sort-btn.active {
    color: white;
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.active-search-info {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
}

.active-search-info p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.clear-search {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-left: 1rem;
    transition: color 0.2s ease;
}

.clear-search:hover {
    color: #dc2626;
}

.no-videos-message {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-primary);
    border-radius: 1rem;
}

.no-videos-message p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 768px) {
    .video-filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .video-search-form {
        min-width: 100%;
    }

    .video-sort-controls {
        justify-content: center;
        flex-wrap: wrap;
    }

    .sort-label {
        width: 100%;
        text-align: center;
        margin-bottom: 0.25rem;
    }
}

/* ==========================================
   DARK MODE
   ========================================== */

/* Dark mode variables */
[data-theme="dark"] {
    --primary-color: #818cf8;
    --primary-dark: #6366f1;
    --secondary-color: #a78bfa;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --bg-header: #1e293b;
    --bg-body: #0f172a;
    --border-color: #374151;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Dark mode specific overrides */
[data-theme="dark"] .nav-brand a {
    color: #ffffff;
}

[data-theme="dark"] .nav-brand a:hover {
    color: #e5e7eb;
}

[data-theme="dark"] .video-thumbnail {
    background: #111827;
}

[data-theme="dark"] .video-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .weather-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .theme-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .channel-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .channel-card-logo {
    background: #ffffff;
}

[data-theme="dark"] .navbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .mega-menu {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .nav-dropdown-menu {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .form-group select {
    background: var(--bg-secondary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") no-repeat right 1rem center;
    background-size: 1rem;
}

[data-theme="dark"] .video-search-input {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .video-search-input:focus {
    background: #1f2937;
    color: #f9fafb;
    border-color: #818cf8;
}

[data-theme="dark"] .channels-search-input:focus {
    background: #1f2937;
    color: #f9fafb;
}

[data-theme="dark"] .sort-btn {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .sort-btn.active {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .pagination .page-link {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .pagination .page-item.active .page-link,
[data-theme="dark"] .pagination .page-link.active {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .active-search-info {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Theme Toggle Button Styles */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-primary);
    font-size: 1.25rem;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Show moon icon in light mode, sun icon in dark mode */
.theme-toggle .icon-moon {
    display: block;
}

.theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

/* ==========================================
   BREADCRUMB NAVIGATION
   ========================================== */

.breadcrumb {
    background: var(--bg-secondary);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: '›';
    padding: 0 0.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active span {
    color: var(--text-primary);
    font-weight: 500;
}

/* Truncate long breadcrumb items on mobile */
@media (max-width: 576px) {

    .breadcrumb-item span,
    .breadcrumb-item a {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
    }
}

/* ==========================================
   NAVBAR SEARCH
   ========================================== */

.nav-search-form {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: 2rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-search-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.nav-search-form input {
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.875rem;
    width: 140px;
    outline: none;
    font-family: inherit;
    transition: width 0.3s ease;
}

.nav-search-form input:focus {
    width: 200px;
}

.nav-search-form input::placeholder {
    color: var(--text-secondary);
}

.nav-search-form button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: var(--transition);
    color: var(--text-secondary);
}

.nav-search-form button:hover {
    opacity: 1;
    transform: scale(1.1);
    color: var(--primary-color);
}

/* Pagination Go To */
/* Pagination Go To */
.pagination-goto {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border-color);
}

.pagination-goto input {
    width: 60px;
    height: 38px;
    padding: 0 0.5rem;
    border: 1px solid var(--border-color);
    /* Visible border */
    border-radius: 0.25rem;
    font-size: 0.9rem;
    text-align: center;
    background: var(--bg-body);
    color: var(--text-primary);
    /* Ensure text is visible */
    transition: var(--transition);
    -moz-appearance: textfield;
    /* Hide spinner in Firefox */
    appearance: textfield;
}

/* Hide spinner in Chrome/Safari/Edge */
.pagination-goto input::-webkit-outer-spin-button,
.pagination-goto input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pagination-goto input:hover {
    border-color: var(--primary-color);
}

.pagination-goto input:focus {
    background: var(--bg-primary);
    border-color: var(--border-color);
    outline: none;
    color: var(--text-primary);
}

.btn-goto {
    height: 38px;
    width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0.25rem;
    transition: var(--transition);
    font-size: 1.1rem;
}

.btn-goto:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--bg-primary);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.back-to-top svg {
    transition: transform 0.3s ease;
}

.back-to-top:hover svg {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 3rem;
        height: 3rem;
    }
}