* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #e50914;
    --primary-dark: #b20710;
    --dark-bg: #0a0a0a;
    --darker-bg: #000000;
    --card-bg: #1a1a1a;
    --text-light: #ffffff;
    --text-gray: #b3b3b3;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: rgba(0, 0, 0, 0.95);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229, 9, 20, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-light);
}

.logo .highlight {
    color: var(--primary-red);
}

/* Search Bar */
.search-bar {
    flex: 1;
    max-width: 400px;
}

.search-bar form {
    display: flex;
    gap: 0.5rem;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #333;
    background: #1a1a1a;
    color: white;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-red);
}

.search-bar button {
    padding: 0.75rem 1.25rem;
    background: var(--primary-red);
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-red);
}

.btn-signup {
    background: var(--primary-red);
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
}

/* Notification Dropdown */
.notification-dropdown {
    position: relative;
}

.notification-icon {
    position: relative;
}

.badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--primary-red);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--card-bg);
    min-width: 300px;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    z-index: 1;
    margin-top: 0.5rem;
}

.notification-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mark-read-btn {
    background: none;
    border: none;
    color: var(--primary-red);
    cursor: pointer;
    font-size: 0.8rem;
}

#notifications {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #333;
    transition: var(--transition);
}

.notification-item.unread {
    background: rgba(229, 9, 20, 0.1);
    border-left: 3px solid var(--primary-red);
}

.notification-item:hover {
    background: #252525;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #000000 0%, #1a0000 100%);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%23e50914" opacity="0.1" d="M50 0 L100 50 L50 100 L0 50 Z"/></svg>') repeat;
    opacity: 0.05;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-red);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid white;
}

.btn-secondary:hover {
    background: white;
    color: black;
    transform: translateY(-2px);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Filters */
.filters-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-gray);
}

.filter-group select {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid #333;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

/* Movies Section */
.movies-section {
    margin-bottom: 3rem;
}

.movies-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.movies-section h2 i {
    color: var(--primary-red);
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.movie-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.movie-poster {
    position: relative;
    padding-top: 150%;
    overflow: hidden;
}

.movie-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.1);
}

.movie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.watch-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-red);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.watch-btn:hover {
    background: white;
    color: var(--primary-red);
    transform: scale(1.05);
}

.coming-soon {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.movie-info {
    padding: 1rem;
}

.movie-info h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.category {
    color: var(--text-gray);
}

.type-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.type-badge.movie {
    background: #4caf50;
    color: white;
}

.type-badge.series {
    background: #2196f3;
    color: white;
}

.type-badge.upcoming {
    background: #ff9800;
    color: white;
}

/* Movie Detail Page */
.movie-detail-page .movie-hero {
    height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
}

.movie-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem;
}

.movie-hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.movie-meta-detail {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.category-badge,
.views {
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    font-size: 0.9rem;
}

.video-section {
    margin: 2rem 0;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.btn-download {
    padding: 0.75rem 2rem;
    background: #4caf50;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-download:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.share-buttons a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #333;
    color: white;
    border-radius: 50%;
    transition: var(--transition);
}

.share-wa:hover { background: #25D366; }
.share-fb:hover { background: #1877F2; }
.share-ig:hover { background: #E4405F; }
.share-tt:hover { background: #000000; }

.description-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.description-section h2 {
    margin-bottom: 1rem;
}

.movie-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
}

/* Auth Pages */
.auth-page {
    background: linear-gradient(135deg, #000000 0%, #1a0000 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

.auth-box {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(229, 9, 20, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: white;
    margin-bottom: 1rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-gray);
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    background: #1a1a1a;
    border: 1px solid #333;
    color: white;
    border-radius: 8px;
    transition: var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-red);
}

.btn-auth {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-auth:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
}

.auth-footer a {
    color: var(--primary-red);
    text-decoration: none;
}

/* Admin Panel */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary-red);
}

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.admin-table {
    width: 100%;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
}

.admin-table thead {
    background: rgba(229, 9, 20, 0.1);
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #333;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit,
.btn-delete {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition);
}

.btn-edit {
    background: #2196f3;
    color: white;
}

.btn-delete {
    background: var(--primary-red);
    color: white;
}

.admin-form {
    max-width: 800px;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
}

.admin-form .form-group {
    margin-bottom: 1.5rem;
}

.admin-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 0.75rem;
    background: #0a0a0a;
    border: 1px solid #333;
    color: white;
    border-radius: 8px;
}

.btn-submit {
    padding: 0.75rem 2rem;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(229, 9, 20, 0.2);
    border: 1px solid var(--primary-red);
    color: var(--primary-red);
}

.alert-success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4caf50;
    color: #4caf50;
}

/* Footer */
.footer {
    background: var(--darker-bg);
    padding: 3rem 0 1rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(229, 9, 20, 0.3);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: white;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-red);
    transform: translateY(-3px);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-red);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid #1a1a1a;
    color: var(--text-gray);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 1rem;
    }
    
    .search-bar {
        width: 100%;
        max-width: none;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
        position: absolute;
        top: 1.5rem;
        right: 1rem;
    }
    
    .nav-links.active {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 1rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .movie-hero-content h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-table {
        font-size: 0.8rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .movie-info h3 {
        font-size: 0.9rem;
    }
    
    .movie-meta {
        font-size: 0.7rem;
    }
}

/* Enhanced styles for movie detail */
.loading-notifications,
.error-notifications {
    padding: 1rem;
    text-align: center;
    color: var(--text-gray);
}

/* User dropdown enhancements */
.user-dropdown-content a i {
    width: 20px;
}

/* Watchlist button enhancements */
.btn-watchlist i {
    margin-right: 0.5rem;
}

/* Related movies section */
.related-movies .movies-grid {
    margin-top: 1rem;
}

/* Video container enhancements */
.video-container iframe {
    pointer-events: auto;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Selection color */
::selection {
    background: var(--primary-red);
    color: white;
}

/* Loading spinner for notifications */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-notifications::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-red);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* Horizontal Scroll Enhancements */
.horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 1rem;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-red) #1a1a1a;
    cursor: grab;
}

.horizontal-scroll-container:active {
    cursor: grabbing;
}

.horizontal-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.horizontal-scroll-container::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 4px;
}

.movie-card-horizontal {
    flex: 0 0 auto;
    width: 200px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card-horizontal:hover {
    transform: translateY(-5px);
}

/* Hero Slider */
.hero-slider-section {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
}

.slider-container {
    position: relative;
}

.slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
    flex: 0 0 100%;
}

.slide-content {
    min-height: 500px;
    background-size: cover !important;
    background-position: center !important;
}

@media (max-width: 768px) {
    .movie-card-horizontal {
        width: 150px;
    }
    
    .slide-content {
        min-height: 350px;
    }
}

/* Translator Name Overlay on Thumbnails */
.translator-overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: linear-gradient(90deg, rgba(229, 9, 14, 0.95), rgba(229, 9, 14, 0.8));
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    backdrop-filter: blur(4px);
    z-index: 3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.5px;
}

.translator-overlay i {
    margin-right: 5px;
    font-size: 0.7rem;
}

.movie-card-horizontal:hover .translator-overlay,
.movie-card:hover .translator-overlay {
    background: linear-gradient(90deg, rgba(229, 9, 14, 1), rgba(229, 9, 14, 0.9));
}