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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 1.2rem;
}

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

.nav-menu a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #007bff;
}

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

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #007bff;
    border-color: #007bff;
}

.btn-secondary:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.video-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.video-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.video-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.video-info {
    padding: 20px;
}

.video-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.video-channel {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.video-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #888;
}

.video-meta .category {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.video-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Sections */
.featured-section,
.categories-preview {
    padding: 80px 20px;
    background: #f8f9fa;
}

.featured-section:nth-child(even) {
    background: white;
}

.featured-section h2,
.categories-preview h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.category-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.category-card p {
    color: #666;
    margin-bottom: 15px;
}

.category-card .count {
    background: #007bff;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Search and Filter */
.search-section {
    background: #f8f9fa;
    padding: 40px 20px;
}

.search-controls {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
}

.search-input {
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
}

.filter-select {
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.clear-filters {
    padding: 15px 25px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.clear-filters:hover {
    background: #545b62;
}

/* Video Detail Page */
.video-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.video-player {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

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

.video-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.video-main h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.video-main .meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: #666;
}

.video-main .description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
}

.video-sidebar {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
}

.video-sidebar h3 {
    margin-bottom: 15px;
    color: #333;
}

.video-sidebar .topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.topic-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 60px 20px 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #007bff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid #555;
    text-align: center;
    color: #ccc;
}

/* Content Pages */
.content-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px;
}

.content-page h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #333;
}

.content-page h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: #333;
}

.content-page h3 {
    font-size: 1.3rem;
    margin: 30px 0 15px;
    color: #333;
}

.content-page p {
    margin-bottom: 20px;
    line-height: 1.7;
    color: #555;
}

.content-page ul,
.content-page ol {
    margin: 20px 0;
    padding-left: 30px;
}

.content-page li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 50px;
        transition: left 0.3s;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

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

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 20px;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

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

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

    .search-controls {
        grid-template-columns: 1fr;
    }

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

    .video-embed {
        height: 250px;
    }

    .featured-section,
    .categories-preview {
        padding: 40px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .video-card {
        margin: 0 -10px;
    }

    .content-page {
        padding: 40px 20px;
    }

    .content-page h1 {
        font-size: 2rem;
    }
}