/* Modern Home Page Styles */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --background-dark: #0f0f23;
    --background-darker: #0a0a1a;
    --surface-color: #1a1a2e;
    --surface-light: #232347;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-color: #2d2d48;
    --border-light: #3f3f5f;
    --success-color: #10b981;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

/* Prevent home.css from affecting header styles */
main *,
.main-container *,
.hero *,
.featured-section *,
.features-section * {
    /* Only apply styles within main content areas */
}

/* Ensure search overlay is hidden on home page */
.search-overlay {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.search-overlay.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure header elements maintain their proper colors */
header,
header *,
nav,
nav *,
.search-toggle,
.hamburger {
    color: inherit !important;
}

/* Fix search input text color on home page */
.search-container input[type="text"] {
    color: #333 !important;
}

/* Specific override for header text to ensure it's black */
header nav ul li a {
    color: #000000 !important;
}

.search-toggle {
    color: #333 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.search-toggle:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.hamburger {
    color: #000000 !important;
}

/* Only apply body styles to non-header elements */
body:not(header) {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Ensure proper spacing for fixed header */
body {
    padding-top: 0; /* Remove any default padding */
}

/* Scope the main body styles to exclude header */
.main-container,
.main-container * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
}

/* Main Container */
.main-container {
    min-height: 100vh;
    background: var(--background-dark);
    padding-top: 60px; /* Ensure content doesn't get hidden behind fixed header */
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--background-darker);
    margin-top: -60px; /* Compensate for body margin-top */
    padding-top: 60px; /* Add padding to ensure content is visible */
}

.hero-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        var(--background-darker) 0%, 
        var(--background-dark) 50%, 
        var(--surface-color) 100%);
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, 
        transparent 0%, 
        rgba(15, 15, 35, 0.8) 70%);
}

/* Animated Background */
.animated-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.floating-shapes {
    position: absolute;
    inset: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: -5s;
    background: var(--gradient-secondary);
}

.shape-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: -10s;
}

.shape-4 {
    width: 180px;
    height: 180px;
    top: 30%;
    right: 30%;
    animation-delay: -15s;
    background: var(--gradient-secondary);
}

.shape-5 {
    width: 120px;
    height: 120px;
    bottom: 40%;
    right: 10%;
    animation-delay: -7s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
    }
    50% {
        transform: translateY(-40px) rotate(180deg);
    }
    75% {
        transform: translateY(-20px) rotate(270deg);
    }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: nowrap;
    margin-bottom: 4rem;
}

.hero-actions .btn {
    flex: 1;
    max-width: 200px;
    min-width: 200px;
    justify-content: center;
    width: 200px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

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

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

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Section Styles */
.featured-section,
.features-section {
    padding: 6rem 0;
    position: relative;
}

.featured-section {
    background: var(--background-dark);
}

.features-section {
    background: var(--surface-color);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Channels Grid */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.channel-card {
    background: var(--surface-light);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.channel-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-light);
}

.channel-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.channel-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.channel-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.channel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.channel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.7));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.channel-card:hover .channel-overlay {
    opacity: 1;
}

.channel-card:hover .channel-image img {
    transform: scale(1.05);
}

.play-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--background-dark);
}

.channel-info {
    padding: 1.5rem;
}

.channel-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.channel-badge {
    font-size: 0.875rem;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-weight: 500;
}

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

.feature-card {
    background: var(--surface-light);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

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

.feature-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

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

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

/* Section Footer */
.section-footer {
    text-align: center;
    margin-top: 3rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
        padding: 2rem 0;
        padding-top: 80px; /* Add padding to account for fixed header */
        margin-top: -60px; /* Keep the negative margin to compensate for body margin */
    }

    .hero-content {
        padding: 1rem;
        padding-top: 2rem; /* Extra padding for mobile */
    }

    .hero-stats {
        gap: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

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

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

    .featured-section,
    .features-section {
        padding: 4rem 0;
        padding-top: 5rem; /* Extra top padding for mobile to ensure content is visible */
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .container {
        padding: 0 1rem;
    }

    /* Ensure mobile header text remains black */
    header nav ul li a {
        color: #000000 !important;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 70px; /* Slightly less padding for smaller screens */
        min-height: 70vh;
        margin-top: -60px; /* Keep the negative margin to compensate for body margin */
    }

    .hero-content {
        padding-top: 1.5rem;
    }

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

    .hero-description {
        font-size: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .featured-section,
    .features-section {
        padding-top: 4rem; /* Slightly less padding for smaller screens */
    }
}

/* Performance optimizations */
.channel-image img,
.feature-icon {
    will-change: transform;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .shape {
        animation: none;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.channel-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-secondary: #ffffff;
        --border-color: #ffffff;
    }
} 