* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Light Mode (Default) */
body.light {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #333;
    transition: background 0.3s, color 0.3s;
}

/* Dark Mode */
body.dark {
    background: #1a1a2e;
    color: #eee;
}

body.dark .navbar {
    background: #16213e;
    border-bottom: 1px solid #0f3460;
}

body.dark .hero {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
}

body.dark .movie-card {
    background: #16213e;
    border-color: #0f3460;
}

body.dark .movie-card:hover {
    border-color: #e94560;
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.3);
}

body.dark .movie-info {
    background: #0f3460;
}

body.dark .footer {
    background: #16213e;
    border-top: 1px solid #0f3460;
}

body.dark .modal-content {
    background: #16213e;
}

body.dark .search-box {
    background: #0f3460;
    color: #eee;
    border-color: #533483;
}

body.dark .dropdown-menu {
    background: #16213e;
    border-color: #0f3460;
}

body.dark .dropdown-menu a:hover {
    background: #0f3460;
}

/* Navbar */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex: 1;
}

.menu a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.menu a:hover {
    background: #f0f0f0;
    color: #667eea;
}

body.dark .menu a:hover {
    background: #0f3460;
    color: #e94560;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0.5rem;
    border: 1px solid #e0e0e0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    border-radius: 0;
}

.dropdown-menu a:hover {
    background: #f5f5f5;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.theme-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.search-box {
    padding: 0.6rem 1.2rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    min-width: 250px;
}

.search-box:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.admin-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.admin-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

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

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.95;
}

/* Section */
.section-title {
    margin: 3rem 0 2rem;
}

.section-title h3 {
    font-size: 2rem;
    font-weight: 700;
}

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

.movie-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.movie-poster {
    position: relative;
    width: 100%;
    padding-bottom: 150%;
    overflow: hidden;
    background: #f0f0f0;
}

.movie-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

.movie-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.play-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    transition: transform 0.3s;
}

.movie-card:hover .play-btn {
    transform: scale(1.1);
}

.movie-info {
    padding: 1.2rem;
    background: #fafafa;
}

.movie-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-category {
    color: #666;
    font-size: 0.9rem;
}

body.dark .movie-category {
    color: #aaa;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    padding: 2rem;
    overflow: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 1200px;
    width: 100%;
    padding: 2rem;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #dc3545;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s;
}

.modal-close:hover {
    transform: rotate(90deg);
}

#videoTitle {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

#adContainer {
    background: #fff3cd;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 1rem;
    border: 2px solid #ffc107;
}

body.dark #adContainer {
    background: #3d3d00;
    border-color: #ffc107;
}

#adContainer a,
.wait-link {
    display: inline-block;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 0.5rem;
    transition: transform 0.3s;
}

#adContainer a:hover,
.wait-link:hover {
    transform: scale(1.05);
}

#downloadSection {
    display: none;
    text-align: center;
    margin-bottom: 1rem;
}

.download-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.download-btn i {
    margin-right: 0.5rem;
}

#videoPlayer {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 8px;
}

/* Footer */
.footer {
    background: #fff;
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    margin-top: 4rem;
}

.loader {
    text-align: center;
    padding: 4rem;
    font-size: 1.2rem;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-content {
        flex-wrap: wrap;
    }
    
    .menu {
        order: 3;
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-box {
        min-width: 150px;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    #videoPlayer {
        height: 300px;
    }
}