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

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

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

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
}

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

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

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 4rem 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

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

.hero-content p {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 2rem;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    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;
    transform: translateY(-1px);
}

/* Sections */
.featured-section,
.categories-section,
.content-section,
.video-directory {
    padding: 4rem 0;
}

.page-header {
    background: #f8fafc;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    color: #64748b;
}

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

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

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

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

.video-info {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

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

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

.video-category {
    background: #e2e8f0;
    color: #475569;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

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

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

/* Filters */
.filters-section {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.search-box {
    margin-bottom: 1rem;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
}

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

.filter-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
}

.results-info {
    margin-bottom: 1rem;
    color: #64748b;
    font-weight: 500;
}

/* Video Detail Page */
.video-detail {
    margin-bottom: 3rem;
}

.video-player {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

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

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

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

.video-description {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.video-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.topic-tag {
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
}

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

.video-sidebar h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.video-sidebar .video-meta {
    display: block;
}

.video-sidebar .video-meta > div {
    margin-bottom: 0.5rem;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.content-main h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1e293b;
    margin: 2rem 0 1rem 0;
}

.content-main h2:first-child {
    margin-top: 0;
}

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

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

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

.info-box {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.info-box h3,
.info-box h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.info-box ul {
    list-style: none;
    margin: 0;
}

.info-box li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

/* Forms */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-textarea {
    resize: vertical;
    font-family: inherit;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Legal Content */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 2rem 0 1rem 0;
}

.legal-content h2:first-child {
    margin-top: 0;
}

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

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

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

/* Categories Page */
.category-sections {
    display: grid;
    gap: 3rem;
}

.category-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.category-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 1rem;
}

.category-section p {
    color: #64748b;
    margin-bottom: 2rem;
}

/* Not Found */
.not-found-content {
    text-align: center;
    padding: 4rem 2rem;
}

.not-found-content h1 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 1rem;
}

.not-found-content p {
    color: #64748b;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 3rem 0 1rem 0;
    margin-top: 4rem;
}

.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: white;
}

.footer-section p {
    color: #cbd5e1;
    line-height: 1.6;
}

.footer-section a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

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

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

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

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

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

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

    .filter-controls {
        flex-direction: column;
    }

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

    .video-player {
        height: 250px;
    }
}

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

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

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

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

    .contact-form,
    .info-box {
        padding: 1.5rem;
    }
}

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

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

[dir="rtl"] .hero .container {
    grid-template-columns: 1fr 1fr;
}

[dir="rtl"] .content-grid {
    grid-template-columns: 1fr 2fr;
}

[dir="rtl"] .video-details {
    grid-template-columns: 1fr 2fr;
}

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

[dir="rtl"] ul {
    margin: 1rem 2rem 1rem 0;
}

[dir="rtl"] .legal-content ul {
    margin: 1rem 2rem 1rem 0;
}

[dir="rtl"] .content-main ul {
    margin: 1rem 2rem 1rem 0;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .filters-section,
    .btn {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .video-player {
        display: none;
    }

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