/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    color: #ff6b6b;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: #ff6b6b;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #ff6b6b;
    border-radius: 2px;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0.5rem 0 0 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 4px;
    margin: 0 0.5rem;
}

.dropdown-link:hover,
.dropdown-link.active {
    background: #ff6b6b;
    color: white;
}

.nav-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    display: none;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main {
    flex: 1;
}

/* Hero Section (consolidated) */
.hero,
.page-hero {
    padding: 4rem 0;
    text-align: center;
    color: white;
}

.hero {
    background: transparent;
}

.page-hero {
    background: rgba(0, 0, 0, 0.1);
}

.search-section h2,
.page-hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.search-section p,
.page-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Page Filters */
.page-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

/* Category Info Section */
.category-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.category-icon-large {
    font-size: 4rem;
    opacity: 0.9;
    color: #ff6b6b;
}

.category-description {
    font-size: 1.1rem;
    opacity: 0.9;
    text-align: center;
    max-width: 600px;
    line-height: 1.6;
}

/* Search Container */
.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0.5rem;
    backdrop-filter: blur(10px);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    color: white;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn {
    background: #ff6b6b;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

/* Search Filters */
.search-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.filter-select {
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.filter-select:hover,
.filter-select:focus {
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}

/* Checkbox Styling */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Results Section */
.results-section {
    padding: 4rem 0;
    background: white;
}

.loading {
    text-align: center;
    padding: 4rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    text-align: center;
    padding: 2rem;
    color: #e74c3c;
}

.error i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.results-header {
    margin-bottom: 2rem;
}

.results-header h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.results-info {
    color: #666;
    font-size: 0.9rem;
}

/* Categories Section */
.categories-section {
    padding: 4rem 0;
    background: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.category-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.category-card > * {
    position: relative;
    z-index: 2;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.category-card p {
    opacity: 0.9;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.explore-text {
    opacity: 0.8;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.explore-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.explore-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Category Results */
.category-results {
    background: #f8f9fa;
    min-height: 100vh;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
}

.category-header h3 {
    font-size: 2rem;
    color: #333;
    margin: 0;
}

/* Category Info Section */
.category-info-section {
    padding: 4rem 0;
    background: white;
}

.category-info-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.category-info-text h3 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 2rem;
}

.category-info-text p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.category-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: #ff6b6b;
    color: white;
    transform: translateY(-2px);
}

.feature-item i {
    font-size: 2rem;
    color: #ff6b6b;
}

.feature-item:hover i {
    color: white;
}

.feature-item span {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.video-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 107, 107, 0.8), rgba(118, 75, 162, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .video-overlay {
    opacity: 1;
}

.play-icon {
    font-size: 3rem;
    color: white;
}

.video-info {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.video-views {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.video-views i {
    color: #ff6b6b;
}

.video-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.video-rating i {
    color: #ffd700;
}

.video-duration {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Video Badges */
.new-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff6b6b;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.popularity-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.popularity-badge.popular {
    background: linear-gradient(45deg, #ff6b6b, #ff5252);
}

.popularity-badge.trending {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.popularity-badge.hot {
    background: linear-gradient(45deg, #ff9800, #f57c00);
}

/* Video Added Date */
.video-added {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.3rem;
}

.video-added i {
    color: #ff6b6b;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #ff6b6b;
    color: white;
}

.btn-primary:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-info {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #000;
    border-radius: 15px;
    padding: 0;
    max-width: 95vw;
    max-height: 95vh;
    width: 900px;
    overflow: hidden;
}

/* Video Player Container */
.video-player-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.video-player-wrapper {
    background: #000;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info-panel {
    background: #1a1a1a;
    color: white;
    padding: 1.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.video-info-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ff6b6b;
}

.video-info-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.video-info-stat {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.video-info-label {
    font-size: 0.8rem;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.video-info-value {
    font-size: 1rem;
    color: white;
    font-weight: 500;
}

.video-info-description {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.5;
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ff6b6b;
}

.video-details {
    margin-top: 1rem;
}

.video-details h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.video-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.video-detail-label {
    font-weight: 600;
    color: #666;
}

.video-detail-value {
    color: #333;
}

.video-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.video-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-thumb:hover {
    transform: scale(1.05);
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.disclaimer {
    margin-top: 1rem;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: block;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .search-filters,
    .page-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .pagination {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-content {
        width: 95vw;
        max-width: 95vw;
        height: 95vh;
        max-height: 95vh;
        padding: 0;
    }

    .video-player-container {
        height: 100%;
    }

    .video-player-wrapper {
        padding-bottom: 60%; /* Slightly taller for mobile */
    }

    .video-info-panel {
        padding: 1rem;
        max-height: 150px;
    }

    .video-info-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .search-section h2,
    .page-hero h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .header .container {
        padding: 0.8rem 15px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .search-section h2 {
        font-size: 1.8rem;
    }

    .search-input {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }

    .search-btn {
        padding: 0.8rem 1.5rem;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .category-card {
        padding: 1.5rem;
    }

    .category-icon {
        font-size: 2.5rem;
    }

    .category-card h3 {
        font-size: 1.2rem;
    }

    .category-card p {
        font-size: 0.85rem;
    }

    .explore-text {
        font-size: 0.8rem;
    }
}
