* {
    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: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
    text-decoration: none;
}

.logo {
    width: 40px;
    height: 40px;
}

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

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

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

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 500px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s;
}

.cta-button:hover {
    background: #1d4ed8;
}

.hero-image img {
    width: 100%;
    height: auto;
}

/* 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: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

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

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

.video-info {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

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

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.video-description {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
}

.video-category {
    display: inline-block;
    background: #e5e7eb;
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

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

.featured-videos h2,
.categories-preview h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 3rem;
}

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

.view-all-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.view-all-link:hover {
    text-decoration: underline;
}

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

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-3px);
}

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

.category-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.category-card a {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
}

.category-card a:hover {
    background: #1d4ed8;
}

/* Search and Filter */
.search-filter {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
}

.search-button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.search-button:hover {
    background: #1d4ed8;
}

.filter-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    background: white;
}

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

.video-player {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.video-placeholder {
    color: white;
    text-align: center;
    padding: 4rem;
}

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

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

.video-main .video-meta {
    margin-bottom: 2rem;
    font-size: 1rem;
}

.video-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #374151;
}

.video-sidebar {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
}

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

.video-topics h3 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.topic-tag {
    display: inline-block;
    background: #e5e7eb;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin: 0.25rem;
}

.content-notice {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #92400e;
}

/* 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 h3,
.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.3s;
}

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

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

/* Page Content */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

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

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

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

.page-content ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.page-content li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.contact-info {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.contact-info h3 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info a {
    color: #2563eb;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

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

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

    .nav-toggle {
        display: flex;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 1rem;
    }

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

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

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

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

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

    .filter-options {
        justify-content: center;
    }

    .nav {
        padding: 1rem;
    }

    .page-content {
        padding: 2rem 1rem;
    }
}

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

    .hero-content p {
        font-size: 1rem;
    }

    .featured-videos h2,
    .categories-preview h2 {
        font-size: 2rem;
    }

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

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero {
    direction: rtl;
}

[dir="rtl"] .footer-content {
    direction: rtl;
}