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

html {
    font-size: 16px;
    line-height: 1.6;
}

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

img {
    max-width: 100%;
    height: auto;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    padding: 1rem 0;
}

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

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

.nav-logo:hover {
    text-decoration: none;
}

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

.nav-link {
    color: #666;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #007bff;
    text-decoration: none;
}

.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 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    display: flex;
    align-items: center;
    min-height: 500px;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

.cta-button {
    display: inline-block;
    background: #fff;
    color: #667eea;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-decoration: none;
}

/* Page Header */
.page-header {
    background: #f8f9fa;
    padding: 3rem 0;
    text-align: center;
}

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

.page-header p {
    font-size: 1.1rem;
    color: #666;
}

/* Sections */
section {
    padding: 4rem 0;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.content-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #333;
}

.content-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.content-section ul {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

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

.video-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

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

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.video-info {
    padding: 1.5rem;
}

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

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

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

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

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

.category-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    background: #e9ecef;
    text-decoration: none;
}

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

.category-card p {
    color: #666;
    margin: 0;
}

/* Browser Controls */
.browser-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

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

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

.results-info {
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

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

.video-player-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

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

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

.video-main-info h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
    line-height: 1.3;
}

.video-main-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.video-main-meta span {
    color: #666;
    font-size: 0.9rem;
}

.video-description-full {
    line-height: 1.7;
    color: #555;
}

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

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

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

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-tag {
    background: #e9ecef;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #666;
}

.content-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 2rem;
    color: #856404;
    font-size: 0.9rem;
}

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

.feature-item {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
}

.feature-item h3 {
    color: #333;
    margin-bottom: 0.75rem;
}

.feature-item p {
    color: #666;
    margin: 0;
}

/* Contact Page */
.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.submit-button {
    background: #007bff;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background: #0056b3;
}

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

.form-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

.contact-info-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h3,
.contact-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

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

.legal-content h2 {
    color: #333;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

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

/* Section Footer */
.section-footer {
    text-align: center;
    margin-top: 3rem;
}

.view-all-link {
    display: inline-block;
    color: #007bff;
    font-weight: 600;
    padding: 1rem 2rem;
    border: 2px solid #007bff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    background: #007bff;
    color: white;
    text-decoration: none;
}

/* Footer */
.footer {
    background: #343a40;
    color: #fff;
    padding: 3rem 0 1rem;
    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: #fff;
}

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

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

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

.footer-section ul li a {
    color: #adb5bd;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #fff;
    text-decoration: none;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        gap: 1rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .video-details {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .browser-controls {
        flex-direction: column;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .video-card {
        margin: 0;
    }
    
    .video-info {
        padding: 1rem;
    }
    
    section {
        padding: 2rem 0;
    }
}

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

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

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

[dir="rtl"] .hero-content {
    text-align: right;
}

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

[dir="rtl"] .video-details {
    direction: rtl;
}

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

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