/* ==================== Variables ==================== */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #FFD700;
    --accent-color: #FFA500;
    --text-color: #ffffff;
    --text-secondary: #cccccc;
    --border-color: #333333;
    --hover-color: #2a2a2a;
    --transition: all 0.3s ease;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.3);
    --bg-overlay: rgba(26, 26, 26, 0.95);
    --bg-section: rgba(42, 42, 42, 0.5);
    --bg-card: var(--hover-color);
    --bg-input: rgba(255, 255, 255, 0.08);
}

/* Light Mode Variables */
[data-theme="light"] {
    --primary-color: #f5f5f5;
    --secondary-color: #d4af37;
    --accent-color: #ff8c00;
    --text-color: #1a1a1a;
    --text-secondary: #555555;
    --border-color: #e0e0e0;
    --hover-color: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.08);
    --bg-overlay: rgba(245, 245, 245, 0.95);
    --bg-section: rgba(255, 255, 255, 0.8);
    --bg-card: #ffffff;
    --bg-input: rgba(0, 0, 0, 0.05);
}

/* ==================== Global Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== Navigation Bar ==================== */
.navbar {
    background-color: var(--bg-overlay);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--secondary-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-light);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary-color);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.logo i {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover,
.nav-menu a:active {
    color: var(--secondary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a:active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Theme Toggle Button */
.theme-toggle {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

/* ==================== Navbar Auth Section ==================== */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-auth-buttons {
    display: flex;
    gap: 1rem;
}

.nav-login-btn,
.nav-register-btn {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-login-btn {
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.nav-login-btn:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.nav-register-btn {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.nav-register-btn:hover {
    background-color: var(--accent-color);
}

/* ==================== User Menu ==================== */
.nav-user-menu {
    position: relative;
}

.nav-user-btn {
    background: none;
    border: 2px solid var(--secondary-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.nav-user-btn:hover {
    background-color: rgba(255, 215, 0, 0.1);
}

.user-avatar {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--hover-color);
    border: 2px solid var(--secondary-color);
    border-radius: 5px;
    min-width: 200px;
    z-index: 50;
    margin-top: 0.5rem;
    box-shadow: var(--shadow);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.user-dropdown a:last-of-type {
    border-bottom: none;
}

.user-dropdown a:hover {
    background-color: rgba(255, 215, 0, 0.1);
    color: var(--secondary-color);
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0;
}

/* ==================== Hero Section ==================== */
.hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    padding: 8rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    animation: float 20s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(20px) translateX(20px);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideDown 0.8s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.search-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 2rem;
}

.search-container input {
    padding: 12px 20px;
    border: 2px solid var(--secondary-color);
    background-color: rgba(255, 215, 0, 0.1);
    color: var(--text-color);
    border-radius: 50px;
    width: 300px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-container input:focus {
    outline: none;
    background-color: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.search-container button {
    padding: 12px 25px;
    background-color: var(--secondary-color);
    border: none;
    border-radius: 50px;
    color: var(--primary-color);
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.search-container button:hover {
    background-color: var(--accent-color);
    transform: scale(1.05);
}

/* ==================== Sections ==================== */
section {
    padding: 4rem 0;
}

/* ==================== Hero Section ==================== */
.hero {
    position: relative;
    min-height: 56vh;
    display: flex;
    align-items: center;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26,26,26,0.85) 0%, rgba(26,26,26,0.6) 60%), url('assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    filter: saturate(0.95) contrast(1);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
    padding: 3rem 0;
}

.hero-left {
    flex: 1 1 60%;
}

.hero-left h1 {
    font-size: 2.4rem;
    color: var(--secondary-color);
    margin-bottom: 0.6rem;
}

.hero-sub {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
}

/* Hero CTAs - button system */
.hero-ctas {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.1rem;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

.btn:focus {
    outline: 3px solid rgba(255,215,0,0.18);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--secondary-color);
    border-color: rgba(255,215,0,0.15);
}

.btn-outline:hover {
    background: rgba(255,215,0,0.06);
    color: var(--secondary-color);
    transform: translateY(-2px);
}

@media (max-width: 900px) {
    .hero-ctas { flex-direction: column; align-items: flex-start; width: 100%; }
    .hero-ctas .btn { width: 100%; justify-content: center; }
}

.hero-right {
    flex: 0 0 36%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.hero-search {
    display: flex;
    gap: 0.5rem;
    background: rgba(255,255,255,0.04);
    padding: 0.6rem;
    border-radius: 10px;
    border: 1px solid rgba(255,215,0,0.06);
}

.hero-search input {
    flex: 1;
    padding: 0.9rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1rem;
}

.hero-search input::placeholder { color: #bfbfbf; }

.search-btn {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
}

.hero-note {
    margin-top: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* accessibility helper */
.sr-only { position: absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

@media (max-width: 900px) {
    .hero-content { flex-direction: column; align-items: flex-start; }
    .hero-right { width: 100%; margin-top: 1rem; }
    .hero-left h1 { font-size: 1.8rem; }
}


section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--secondary-color);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* ==================== Movies Grid ==================== */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Force 4 columns on wide screens */
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    grid-auto-rows: 1fr;
}

.movie-card {
    background-color: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.movie-card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary-color);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.3);
}

.movie-poster-wrapper {
    position: relative;
    overflow: hidden;
    height: 360px; /* increased for larger card appearance */
}

.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
}

.movie-poster::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
}

.movie-overlay {
    display: none; /* hide overlays (heart & imdb) per UI request */
}

.movie-favorite-btn { display: none; }

.movie-favorite-btn:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

.movie-favorite-btn.active {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.movie-imdb-rating { display: none; }

.movie-imdb-rating i {
    color: #FFB81C;
    font-size: 1rem;
}

.movie-imdb-rating span {
    color: #FFB81C;
    font-weight: bold;
    font-size: 0.9rem;
}

.movie-info {
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.8);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.movie-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    color: var(--secondary-color);
    word-break: break-word;
    line-height: 1.3;
}

.movie-year {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.movie-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.movie-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background-color: rgba(255, 215, 0, 0.1);
    border-radius: 5px;
    border-left: 3px solid var(--secondary-color);
}

.movie-rating i {
    color: var(--secondary-color);
}

.movie-rating span {
    font-weight: bold;
}

.movie-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.movie-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.movie-btn.add-btn {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.movie-btn.add-btn:hover {
    background-color: var(--accent-color);
}

.movie-btn.add-btn.active {
    background-color: var(--accent-color);
}

/* ==================== Trending Section ==================== */
.trending-section {
    background-color: var(--bg-section);
}

/* ==================== Filters Panel ==================== */
.filters-panel {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(42, 42, 42, 0.95) 100%);
    border: 2px solid var(--secondary-color);
    border-radius: 15px;
    margin-bottom: 2.5rem;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.1);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.15) 100%);
    cursor: pointer;
    user-select: none;
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
    transition: var(--transition);
}

.filters-header:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%);
}

.filters-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.filters-header h3 i {
    font-size: 1.3rem;
}

.toggle-filters-btn {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.6rem 0.9rem;
    transition: var(--transition);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.toggle-filters-btn:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.filters-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(26, 26, 26, 0.6);
}

.filters-content.active {
    max-height: 1500px;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.8rem;
    padding: 2rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.filter-group label {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
}

.filter-group label i {
    font-size: 1rem;
    opacity: 0.9;
}

.filter-select,
.filter-input {
    padding: 0.85rem 1rem;
    background-color: var(--bg-input);
    border: 2px solid rgba(255, 215, 0, 0.25);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FFD700' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.filter-select:hover,
.filter-input:hover {
    border-color: rgba(255, 215, 0, 0.5);
    background-color: rgba(255, 255, 255, 0.1);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: rgba(255, 215, 0, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2), 0 5px 20px rgba(255, 215, 0, 0.3);
}

/* Dropdown option styles - DARK THEME */
.filter-select option {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    padding: 0.8rem 1rem;
    border: none;
}

.filter-select option:checked,
.filter-select option:hover {
    background-color: var(--secondary-color) !important;
    color: var(--primary-color) !important;
}

/* Custom Multiselect for Genres */
.custom-multiselect {
    position: relative;
    width: 100%;
}

.multiselect-trigger {
    padding: 0.85rem 1rem;
    background-color: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 215, 0, 0.25);
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.multiselect-trigger:hover {
    border-color: rgba(255, 215, 0, 0.5);
    background-color: rgba(255, 255, 255, 0.1);
}

.multiselect-trigger i {
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.multiselect-dropdown.active + .multiselect-trigger i,
.custom-multiselect:has(.multiselect-dropdown.active) .multiselect-trigger i {
    transform: rotate(180deg);
}

.multiselect-text {
    flex: 1;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multiselect-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.98) 0%, rgba(42, 42, 42, 0.98) 100%);
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 215, 0, 0.2);
    z-index: 10000;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-10px);
    backdrop-filter: blur(10px);
}

.multiselect-dropdown.active {
    max-height: 350px;
    opacity: 1;
    transform: translateY(0);
    overflow: visible;
    display: block;
}

.multiselect-search {
    padding: 0.8rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.multiselect-search input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 5px;
    color: var(--text-color);
    font-size: 0.9rem;
}

.multiselect-search input:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: rgba(255, 215, 0, 0.1);
}

.multiselect-search input::placeholder {
    color: var(--text-secondary);
}

.multiselect-options {
    max-height: 250px;
    overflow-y: auto;
    padding: 0.5rem;
}

.multiselect-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.3rem;
}

.multiselect-option:hover {
    background-color: rgba(255, 215, 0, 0.15);
}

.multiselect-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--secondary-color);
}

.multiselect-option label {
    flex: 1;
    cursor: pointer;
    color: var(--text-color);
    font-size: 0.95rem;
    user-select: none;
}

.multiselect-option input[type="checkbox"]:checked + label {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Custom scrollbar for multiselect */
.multiselect-options::-webkit-scrollbar {
    width: 8px;
}

.multiselect-options::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.multiselect-options::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

.multiselect-options::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.year-range,
.rating-range {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.year-range input,
.rating-range input {
    flex: 1;
}

.year-range span,
.rating-range span {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.1rem;
    min-width: 20px;
    text-align: center;
}

.filters-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 2px solid rgba(255, 215, 0, 0.2);
    justify-content: flex-end;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(42, 42, 42, 0.8) 100%);
}

.btn-filter {
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-apply {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: var(--primary-color);
}

.btn-apply:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
}

.btn-apply:active {
    transform: translateY(-1px);
}

.btn-reset {
    background-color: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--text-secondary);
}

.btn-reset:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--text-color);
    color: var(--text-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.btn-reset:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .filters-panel {
        margin-bottom: 2rem;
        border-radius: 12px;
    }

    .filters-header {
        padding: 1.2rem 1.5rem;
    }

    .filters-header h3 {
        font-size: 1.2rem;
    }

    .filters-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 1.5rem;
    }

    .filters-actions {
        flex-direction: column;
        padding: 1.2rem 1.5rem;
        gap: 0.8rem;
    }

    .btn-filter {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1.5rem;
        font-size: 0.95rem;
    }

    .year-range,
    .rating-range {
        flex-direction: row;
        align-items: center;
    }

    .year-range span,
    .rating-range span {
        display: inline;
    }
}

@media (max-width: 480px) {
    .filters-header {
        padding: 1rem 1.2rem;
    }

    .filters-header h3 {
        font-size: 1.1rem;
    }

    .filters-grid {
        padding: 1.2rem;
        gap: 1rem;
    }

    .filter-group label {
        font-size: 0.9rem;
    }

    .filter-select,
    .filter-input {
        padding: 0.75rem 0.9rem;
        font-size: 0.9rem;
    }

    .filters-actions {
        padding: 1rem 1.2rem;
    }

    .btn-filter {
        padding: 0.75rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Ensure trending grid shows 4 columns on wide screens (override other rules) */
.trending-section .movies-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2.5rem !important;
}

/* Pagination styles for trending */
.pagination {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.pagination .page-btn,
.pagination .show-all,
.pagination .collapse-btn {
    background: rgba(255,255,255,0.03);
    color: var(--text-color);
    border: 1px solid rgba(255,215,0,0.08);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.pagination .page-btn[disabled] {
    opacity: 0.4;
    cursor: default;
}

.pagination .page-btn[aria-current="page"], .pagination .page-btn:hover,
.pagination .show-all:hover, .pagination .collapse-btn:hover {
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    color: var(--primary-color);
    transform: translateY(-3px);
}

@media (max-width: 700px) {
    .pagination { gap: 0.4rem; }
    .pagination .page-btn, .pagination .show-all { padding: 0.45rem 0.6rem; font-size: 0.9rem; }
}

/* ==================== Movie of the Day ==================== */
.movie-of-day {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%);
    border-radius: 10px;
    margin: 2rem 0;
}

.movie-of-day-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: center;
}

.movie-of-day-poster {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.movie-of-day-info h3 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.movie-of-day-info p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.movie-of-day-stats {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-value {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

/* ==================== Collection Section ==================== */
.collection-section {
    background-color: var(--bg-section);
}

.collection-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background-color: transparent;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--secondary-color);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 0;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ==================== About Section ==================== */
.about-section {
    background-color: rgba(255, 215, 0, 0.05);
    border-radius: 10px;
}

.about-section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 100%;
    line-height: 1.8;
}

/* ==================== Modal ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--hover-color);
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid var(--secondary-color);
}

.close {
    color: var(--secondary-color);
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close:hover {
    color: var(--accent-color);
}

.modal-body {
    padding: 2rem;
}

.modal-movie-poster {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.modal-movie-title {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.modal-movie-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.info-item {
    background-color: rgba(255, 215, 0, 0.1);
    padding: 1rem;
    border-radius: 5px;
    border-left: 3px solid var(--secondary-color);
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-color);
    font-weight: bold;
    margin-top: 0.5rem;
}

.modal-movie-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 1.5rem 0;
}

/* ==================== Loading Skeleton ==================== */
.loading-skeleton {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1) 25%, rgba(255, 215, 0, 0.2) 50%, rgba(255, 215, 0, 0.1) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 10px;
    height: 300px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==================== Footer ==================== */
.main-footer {
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.98) 0%, rgba(20, 20, 20, 0.98) 100%);
    border-top: 3px solid var(--secondary-color);
    margin-top: 5rem;
    padding: 0;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    opacity: 0.5;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 3rem;
    padding: 3rem 0 2rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

/* Footer Brand Section */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.footer-logo i {
    font-size: 1.8rem;
    animation: pulse 2s infinite;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 400px;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-link {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.2);
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    border-color: var(--secondary-color);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

.social-link.instagram:hover {
    background: linear-gradient(135deg, #E1306C, #C13584);
    color: white;
    border-color: #E1306C;
}

.social-link.telegram:hover {
    background: linear-gradient(135deg, #2AABEE, #229ED9);
    color: white;
    border-color: #2AABEE;
}

/* Footer Links Section */
.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-menu li {
    margin: 0;
}

.footer-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s ease;
    padding: 0.3rem 0;
}

.footer-menu a i {
    width: 18px;
    font-size: 0.85rem;
    color: var(--secondary-color);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.footer-menu a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.footer-menu a:hover i {
    opacity: 1;
    transform: scale(1.2);
}

/* Footer Downloads */
.footer-downloads {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.download-btn i {
    font-size: 1.2rem;
}

.download-btn.android {
    background: linear-gradient(135deg, #3DDC84 0%, #2BB673 100%);
}

.download-btn.android:hover {
    background: linear-gradient(135deg, #2BB673 0%, #3DDC84 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(61, 220, 132, 0.4);
}

.download-btn.windows {
    background: linear-gradient(135deg, #00A4EF 0%, #0078D7 100%);
}

.download-btn.windows:hover {
    background: linear-gradient(135deg, #0078D7 0%, #00A4EF 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 164, 239, 0.4);
}

/* Footer Bottom */
.footer-bottom {
    width: 100%;
    padding: 1.5rem 0;
    background: rgba(0, 0, 0, 0.3);
    margin: 0;
}

.footer-bottom-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-bottom-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: var(--secondary-color);
}

.footer-bottom-links .separator {
    color: rgba(255, 215, 0, 0.3);
    font-size: 0.8rem;
}

.footer-credit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

.footer-credit i {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Contact Email Link */
.contact-email {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-email:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Responsive Footer */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-footer {
        margin-top: 3rem;
    }

    .footer-content {
        padding: 2rem 0 1.5rem;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-downloads {
        flex-direction: row;
        justify-content: flex-start;
    }

    .download-btn {
        flex: 1;
        min-width: 140px;
    }

    .footer-bottom-content {
        gap: 0.8rem;
    }

    .footer-bottom-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-bottom-links .separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .footer-logo {
        font-size: 1.3rem;
    }

    .footer-tagline {
        font-size: 0.9rem;
    }

    .social-link {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .footer-title {
        font-size: 0.9rem;
    }

    .footer-menu a {
        font-size: 0.85rem;
    }

    .download-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    /* Keep logo left and menu icon right on mobile; nav-menu wraps below when opened */
    .navbar-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .logo { order: 1; }
    .theme-toggle { order: 2; margin-left: 0; }
    .menu-toggle { order: 3; }
    .nav-menu { order: 4; width: 100%; display: none; }
    .nav-menu.active { display: flex; flex-direction: column; gap: 1rem; }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
        padding: 0.5rem;
        font-size: 1rem;
    }

    .menu-toggle {
        display: block;
        z-index: 1200;
        position: relative;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        text-align: center;
    }

    .nav-menu.active {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .search-container {
        flex-direction: column;
    }

    .search-container input {
        width: 100%;
    }

    /* Trending grid: force 2 columns on tablet/mobile to avoid small cards */
    .trending-section .movies-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    .movie-of-day-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .movie-of-day-poster {
        max-width: 300px;
        margin: 0 auto;
    }

    section h2 {
        font-size: 1.8rem;
    }

    .modal-content {
        margin: 20% auto;
        width: 90%;
    }

    .modal-movie-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }

    .logo i {
        font-size: 1.5rem;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .search-container input {
        font-size: 0.9rem;
    }

    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.8rem;
    }

    .movie-info {
        padding: 1rem;
    }

    .movie-title {
        font-size: 0.95rem;
    }

    .movie-description {
        font-size: 0.8rem;
        -webkit-line-clamp: 1;
    }

    .movie-actions {
        flex-direction: column;
    }

    section h2 {
        font-size: 1.5rem;
    }

    .collection-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}
