* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff6b6b;
    --primary-dark: #ee5a24;
    --secondary: #0abde3;
    --accent: #feca57;
    --dark: #1e272e;
    --darker: #0f171e;
    --surface: #2c3e50;
    --surface-light: #34495e;
    --text: #ffffff;
    --text-muted: #b2bec3;
    --success: #10ac84;
    --gradient-1: linear-gradient(135deg, #ff6b6b, #ee5a24);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--darker);
    color: var(--text);
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background: rgba(15, 23, 30, 0.95);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 107, 107, 0.3);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.btn-login, .btn-signup, .btn-logout {
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    border: none;
}

.btn-login {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-signup {
    background: var(--gradient-1);
    color: white;
}

.btn-logout {
    background: rgba(255, 107, 107, 0.2);
    color: var(--primary);
    margin-left: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e272e 0%, #0f171e 100%);
    padding: 4rem 30px;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ff6b6b, #feca57, #0abde3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.hero-stats span {
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #1e272e 0%, #0f171e 100%);
    padding: 3rem 30px;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Filters */
.filters {
    padding: 2rem 30px;
    background: var(--dark);
}

.filters-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--surface);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    gap: 0.8rem;
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    width: 100%;
    font-size: 1rem;
}

.filter-select {
    padding: 0.8rem 2rem;
    background: var(--surface);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
}

/* Category Filters */
.category-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.5rem 30px;
    background: var(--darker);
}

.category-btn {
    padding: 0.6rem 1.5rem;
    background: var(--surface);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.category-btn.active, .category-btn:hover {
    background: var(--gradient-1);
}

/* Section Title */
.section-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-left: 30px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Movie Grid */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.featured-card {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    transition: 0.3s;
    cursor: pointer;
}

.featured-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.movie-card {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    transition: 0.3s;
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.movie-poster {
    aspect-ratio: 2/3;
    position: relative;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

.language-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
}

.movie-info {
    padding: 1rem;
}

.movie-title {
    font-weight: 700;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.fav-icon.active {
    color: #ff6b6b;
}

/* Detail Page */
.movie-detail-section {
    padding: 3rem 0;
}

.movie-detail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    background: var(--surface);
    border-radius: 20px;
    padding: 2rem;
}

.detail-poster {
    width: 300px;
    border-radius: 16px;
}

.detail-info {
    flex: 1;
}

.detail-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.detail-meta span {
    background: var(--surface-light);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

.download-section {
    background: var(--darker);
    padding: 1.2rem;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.subtitle-buttons {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.btn-subtitle {
    padding: 0.6rem 1.2rem;
    background: var(--surface-light);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-download {
    background: var(--gradient-1);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Seasons Grid */
.seasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.season-card {
    background: var(--surface);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
}

.season-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 900px;
    width: 90%;
    background: var(--surface);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.trailer-modal {
    background: transparent;
    padding: 0;
}

.trailer-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.trailer-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary);
}

.auth-input {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    border: none;
    background: var(--surface-light);
    color: white;
}

.auth-btn {
    width: 100%;
    padding: 0.8rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    margin-top: 0.5rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--surface);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border-left: 4px solid var(--success);
    transform: translateX(400px);
    transition: 0.3s;
    z-index: 3000;
}

.toast.show {
    transform: translateX(0);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem;
    background: var(--surface);
    border-radius: 20px;
    grid-column: 1 / -1;
}

/* Footer */
.footer {
    background: var(--darker);
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255,107,107,0.2);
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .movie-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
    .detail-poster { width: 100%; max-width: 200px; }
    .nav-container { flex-direction: column; }
    .filters-container { flex-direction: column; }
}