/* CSS Variables for Theme */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Theme */
body.dark-mode {
    --primary-color: #818cf8;
    --primary-dark: #6366f1;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --text-primary: #f3f4f6;
    --text-secondary: #d1d5db;
    --border-color: #374151;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme Toggle Button */
.theme-toggle {
    background-color: var(--border-color);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.theme-toggle:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

.theme-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.theme-toggle:active .theme-icon {
    transform: rotate(20deg);
}



.theme-toggle:active .theme-icon {
    transform: rotate(20deg);
}

/* Hero Section */
.hero {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    margin-bottom: 60px;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
}

/* Category Navigation */
.category-nav {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    margin-bottom: 60px;
    position: sticky;
    top: 75px;
    z-index: 100;
}

.category-nav .container {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.category-btn {
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

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

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

.category-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.category-label {
    display: inline;
}

.category-label-short {
    display: none;
}

/* Section Titles */
.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Video Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

/* Video Card */
.video-card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 177.78%; /* 9:16 aspect ratio */
    height: 0;
    overflow: hidden;
    background-color: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.video-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.4;
}

.video-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    flex-grow: 1;
}

/* Category Sections */
.category-section {
    display: none;
}

.category-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    color: var(--text-secondary);
    margin-top: 80px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 12px 0;
    }

    .logo {
        font-size: 24px;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero h2 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .category-nav {
        top: 60px;
        padding: 12px 0;
        margin-bottom: 40px;
    }

    .category-nav .container {
        gap: 8px;
        overflow-x: auto;
        padding: 0 10px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    .category-btn {
        padding: 10px 16px;
        font-size: 13px;
        border-radius: 6px;
        flex-shrink: 0;
    }

    .category-icon {
        font-size: 18px;
    }

    .videos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .logo {
        font-size: 22px;
    }

    .header {
        padding: 10px 0;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .hero {
        padding: 50px 0;
    }

    .hero h2 {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .hero p {
        font-size: 14px;
    }

    .category-nav {
        top: 52px;
        padding: 10px 0;
        margin-bottom: 30px;
    }

    .category-nav .container {
        gap: 6px;
        padding: 0 5px;
    }

    .category-btn {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 5px;
    }

    .category-icon {
        display: none;
    }

    .category-label {
        display: inline;
    }

    .category-label-short {
        display: none;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 25px;
    }

    .video-title {
        font-size: 16px;
    }

    .video-description {
        font-size: 13px;
    }

    .footer {
        padding: 30px 0;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
