/* ============================================
   LAYOUT - Header, Navigation, Hero, Back-to-Top
   ============================================ */

/* ----- Header ----- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 4%;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.header.scrolled {
    background: var(--header-scrolled);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
    gap: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    flex-shrink: 0;
}

.logo i {
    font-size: 28px;
}

[data-theme="light"] .logo {
    color: #1a1a2e;
}
[data-theme="light"] .logo span:last-child {
    color: var(--primary);
}

/* ----- Mobile Menu Toggle ----- */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    transition: var(--transition);
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    color: var(--primary);
}

/* ----- Nav Links (Desktop) ----- */
.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 4px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

[data-theme="light"] .nav-links a {
    color: #555;
}
[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active {
    color: #1a1a2e;
}

/* ----- Active Underline / Arrow Indicator ----- */
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    animation: underlineSlide 0.3s ease;
}

@keyframes underlineSlide {
    from {
        transform: scaleX(0);
        opacity: 0;
    }
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* ----- Search Link Styling ----- */
.nav-links a[data-category="search"] {
    display: none;
}

/* ----- Header Actions ----- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 4px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

[data-theme="light"] .search-container {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.search-container:focus-within {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .search-container:focus-within {
    background: rgba(0, 0, 0, 0.08);
}

.search-input {
    background: none;
    border: none;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 14px;
    width: 200px;
    outline: none;
}

[data-theme="light"] .search-input {
    color: #1a1a2e;
}

.search-input::placeholder {
    color: var(--text-muted);
}
[data-theme="light"] .search-input::placeholder {
    color: #888;
}

.search-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    color: var(--text-primary);
}

[data-theme="light"] .search-btn {
    color: #555;
}
[data-theme="light"] .search-btn:hover {
    color: #1a1a2e;
}

/* ----- Theme Toggle ----- */
.theme-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
    border-radius: 50%;
}

.theme-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .theme-btn {
    color: #555;
}
[data-theme="light"] .theme-btn:hover {
    color: #1a1a2e;
    background: rgba(0, 0, 0, 0.05);
}

/* ----- Hero Banner ----- */
.hero {
    margin-top: 68px;
    padding: 80px 4%;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border-color);
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    gap: 40px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}

.hero-btn {
    padding: 12px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hero-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

/* ----- Hero Image ----- */
.hero-image {
    flex: 1;
    max-width: 500px;
    position: relative;
    z-index: 1;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
    min-height: 200px;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    color: var(--text-muted);
    font-size: 48px;
}

.hero-image .movie-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
}

.hero-image .movie-title-overlay h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.hero-image .movie-title-overlay p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ----- Back to Top Button ----- */
.back-to-top {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top:hover {
    transform: scale(1.1) translateY(0);
    background: var(--primary-hover);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}