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

/* Navigation */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

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

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

.nav-logo img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
}

.nav-menu li {
    margin-left: 2rem;
}

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

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

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

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

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

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

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

.hero-search {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.hero-search input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
}

.hero-search button {
    padding: 15px 30px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.hero-search button:hover {
    background: #ff5252;
}

/* Video Grid */
.featured,
.categories-preview {
    padding: 80px 0;
}

.featured h2,
.categories-preview h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 600;
}

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

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

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

.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: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.video-info {
    padding: 20px;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

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

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

.video-category {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
}

/* Categories Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    background: #f8f9fa;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border: 2px solid transparent;
}

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

.category-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.category-count {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Search and Filter */
.search-filter {
    background: #f8f9fa;
    padding: 30px 0;
    margin-top: 70px;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}

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

.filter-select {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    background: white;
}

.search-btn {
    padding: 12px 25px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #0056b3;
}

/* Video Detail */
.video-detail {
    padding: 100px 0 50px;
}

.video-player {
    margin-bottom: 30px;
}

.video-embed {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

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

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

.video-description {
    line-height: 1.8;
    margin-bottom: 20px;
}

.video-topics {
    margin-top: 20px;
}

.video-topics h3 {
    margin-bottom: 10px;
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.topic-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
}

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

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

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
}

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

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

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

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

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 20px;
    text-align: center;
    color: #ccc;
}

.footer-bottom p {
    margin-bottom: 5px;
}

/* Contact Page */
.contact-content {
    padding: 100px 0 50px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 30px;
}

.contact-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}

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

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

.submit-btn {
    background: #007bff;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

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

.contact-info h3 {
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .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: 20px 0;
    }

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

    .nav-menu li {
        margin: 10px 0;
    }

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

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

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

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

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

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

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

    .hero {
        padding: 100px 0 60px;
    }

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

    .featured,
    .categories-preview {
        padding: 60px 0;
    }

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

/* Page Specific Styles */
.page-header {
    background: #f8f9fa;
    padding: 100px 0 50px;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

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

.page-content {
    padding: 50px 0;
    line-height: 1.8;
}

.page-content h2 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-content h3 {
    margin-top: 25px;
    margin-bottom: 10px;
}

.page-content ul,
.page-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.page-content li {
    margin-bottom: 5px;
}