* {
    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;
    border-bottom: 1px solid #e1e5e9;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

.logo img {
    width: 32px;
    height: 32px;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-outline {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-outline:hover {
    background: #2563eb;
    color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.video-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.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.875rem;
    font-weight: 500;
}

.video-info {
    padding: 1rem;
}

.video-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    line-height: 1.4;
}

.video-info h3 a {
    color: #1f2937;
    text-decoration: none;
}

.video-info h3 a:hover {
    color: #2563eb;
}

.video-channel {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.video-desc {
    color: #4b5563;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.video-category {
    background: #eff6ff;
    color: #2563eb;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.video-views {
    color: #6b7280;
}

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

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #2563eb;
}

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

.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.category-card p {
    color: #6b7280;
}

/* Sections */
.featured,
.categories-preview {
    padding: 4rem 0;
}

.categories-preview {
    background: #f8fafc;
}

.section-footer {
    text-align: center;
    margin-top: 2rem;
}

/* Search and Filters */
.search-section {
    background: #f8fafc;
    padding: 2rem 0;
}

.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.filter-select {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: white;
    min-width: 150px;
}

.search-results {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Video Detail */
.video-detail {
    padding: 2rem 0;
}

.video-player {
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

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

.video-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.video-main h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.video-main .video-meta {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.video-sidebar {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.75rem;
    height: fit-content;
}

.video-topics {
    margin: 1rem 0;
}

.topic-tag {
    display: inline-block;
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    margin: 0.25rem 0.25rem 0.25rem 0;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #f9fafb;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

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

.footer-section a:hover {
    color: #60a5fa;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Content Pages */
.content-page {
    padding: 2rem 0;
}

.content-page h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #1f2937;
}

.content-page h2 {
    font-size: 1.875rem;
    margin: 2rem 0 1rem;
    color: #1f2937;
}

.content-page h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: #374151;
}

.content-page p {
    margin-bottom: 1rem;
    color: #4b5563;
    line-height: 1.7;
}

.content-page ul,
.content-page ol {
    margin: 1rem 0 1rem 2rem;
    color: #4b5563;
}

.content-page li {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
    }

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

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

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

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

    .search-container {
        flex-direction: column;
    }

    .search-input,
    .filter-select {
        min-width: auto;
    }
}

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

    .hero {
        padding: 2rem 0;
    }

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

    .featured,
    .categories-preview {
        padding: 2rem 0;
    }

    .video-card {
        margin-bottom: 1rem;
    }
}

/* Hidden class for JavaScript */
.hidden {
    display: none !important;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}