/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --primary-color: #e50914;
    --bg-color: #0f1014;
    --card-bg: #1f2125;
    --text-color: #ffffff;
    --text-muted: #a1a1a1;
    --nav-height: 60px;
}

body { 
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased;
    padding-bottom: 70px; /* Space for mobile nav */
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- HEADER (Desktop) --- */
header { 
    background-color: rgba(15, 16, 20, 0.95); 
    backdrop-filter: blur(10px);
    padding: 0 40px; 
    height: var(--nav-height);
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo a { 
    font-size: 1.5rem; 
    font-weight: 800; 
    color: var(--primary-color); 
    letter-spacing: -1px;
    text-transform: uppercase;
}

.nav-container { display: flex; align-items: center; gap: 30px; flex: 1; justify-content: flex-end; }
.nav-menu ul { display: flex; gap: 25px; align-items: center; }
.nav-menu a { font-size: 0.9rem; color: #ccc; font-weight: 500; transition: color 0.3s; position: relative; }
.nav-menu a:hover, .nav-menu a.active { color: #fff; }

/* Desktop Dropdown */
.dropdown-trigger { position: relative; padding: 10px 0; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1f2125;
    min-width: 150px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 4px;
    padding: 10px 0;
    z-index: 1002;
    border: 1px solid rgba(255,255,255,0.1);
}
.dropdown-trigger:hover .dropdown-menu { display: block; animation: fadeIn 0.2s ease; }
.dropdown-menu a { display: block; padding: 8px 20px; color: #aaa; font-size: 0.9rem; }
.dropdown-menu a:hover { color: #fff; background: rgba(255,255,255,0.05); }

/* Header Search Bar (Steam style) */
.header-search {
    position: relative;
    margin: 0 20px;
    flex: 1;
    max-width: 400px;
}
.header-search form { display: flex; }
.header-search input {
    width: 100%;
    background: #101114; /* Darker than bg */
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    padding: 8px 12px;
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.3s;
}
.header-search input:focus {
    border-color: var(--primary-color);
    background: #1a1c20;
    outline: none;
}
.header-search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
}
.header-search button:hover { color: #fff; }

.user-actions { display: flex; gap: 20px; align-items: center; }
.icon-btn { color: #ccc; font-size: 1.1rem; transition: color 0.3s; position: relative; }
.icon-btn:hover { color: #fff; }
.icon-btn .badge { /* If needed for notifications */
    position: absolute; top: -5px; right: -5px; width: 8px; height: 8px; background: var(--primary-color); border-radius: 50%;
}

/* User Dropdown Click Interaction */
.user-dropdown { 
    position: relative; 
    cursor: pointer; 
    display: flex;
    align-items: center;
    gap: 5px;
}
.user-avatar-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.user-dropdown.active .dropdown-content { display: block; animation: fadeIn 0.2s; }
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #1f2125;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    border-radius: 4px;
    z-index: 1001;
    margin-top: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}
/* Removed hover interaction */
.dropdown-content a {
    color: #ccc;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}
.dropdown-content a:hover { background: rgba(255,255,255,0.05); color: #fff; }
.dropdown-content a:last-child { border-bottom: none; }

.btn-login {
    background: var(--primary-color);
    padding: 6px 18px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}
.btn-login:hover { background: #ff0f1f; }

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

/* --- MOBILE DRAWER & HEADER --- */
.mobile-header {
    display: none; /* Default hidden */
}
.mobile-drawer, .drawer-overlay { display: none; }

@media (max-width: 768px) {
    header { display: none; /* Hide Desktop Header */ }
    
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        position: fixed; /* Fixed top */
        top: 0; left: 0; right: 0;
        z-index: 1000;
        background: rgba(15, 16, 20, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255,255,255,0.05);
        height: 70px;
    }
    
    /* Adjust body padding for fixed header */
    body { padding-top: 70px; }

    .header-left { display: flex; align-items: center; gap: 15px; }
    
    /* Hamburger Button */
    .hamburger-btn {
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
        display: flex;
        flex-direction: column;
        gap: 5px;
        z-index: 1200;
    }
    .hamburger-btn .bar {
        width: 24px;
        height: 2px;
        background-color: #fff;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    /* Hamburger Animation to X */
    .hamburger-btn.active .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .hamburger-btn.active .bar:nth-child(2) { opacity: 0; }
    .hamburger-btn.active .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    /* Drawer Styles */
    .mobile-drawer {
        display: block;
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 280px;
        background: #16181c;
        z-index: 1100;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 20px rgba(0,0,0,0.5);
        padding-top: 20px;
    }
    .mobile-drawer.open { transform: translateX(0); }
    
    .drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .drawer-header h3 { font-size: 1.2rem; font-weight: 700; color: #fff; }
    .close-drawer-btn { background: none; border: none; color: #888; font-size: 1.5rem; cursor: pointer; }

    .drawer-content { padding: 20px 0; overflow-y: auto; height: calc(100% - 60px); }
    .drawer-nav li a {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 15px 25px;
        color: #ccc;
        font-size: 1rem;
        transition: background 0.2s;
    }
    .drawer-nav li a:hover { background: rgba(255,255,255,0.05); color: #fff; }
    .drawer-nav li a i { width: 20px; text-align: center; color: var(--primary-color); }
    
    .drawer-nav .divider {
        height: 1px;
        background: rgba(255,255,255,0.05);
        margin: 10px 20px;
    }

    /* Overlay */
    .drawer-overlay {
        display: block;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.7);
        z-index: 1050;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s;
        backdrop-filter: blur(2px);
    }
    .drawer-overlay.open { opacity: 1; visibility: visible; }
}

/* --- HERO BANNER --- */
.hero-banner {
    position: relative;
    width: 100%;
    height: 500px; /* Taller on desktop */
    background-size: cover;
    background-position: center top;
    display: flex;
    align-items: flex-end;
    margin-bottom: 40px;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, var(--bg-color) 10%, rgba(15,16,20,0.6) 50%, rgba(15,16,20,0.2) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
}
.hero-badge {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: inline-block;
}
.hero-title { 
    font-size: 3rem; 
    font-weight: 800; 
    margin-bottom: 15px; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    max-width: 700px;
    line-height: 1.1;
}
.hero-desc {
    color: #ddd;
    max-width: 600px;
    margin-bottom: 25px;
    font-size: 1.1rem;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- MAIN LAYOUT --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.main-wrapper { display: flex; gap: 40px; margin-top: -20px; position: relative; z-index: 10; }

.content-area { flex: 3; }
.sidebar-area { 
    flex: 1; 
    min-width: 300px;
    position: sticky;
    top: 80px;
    height: fit-content;
}

/* --- SECTIONS & CARDS --- */
.section-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
}
.category-title { 
    font-size: 1.5rem; 
    font-weight: 700; 
    display: flex; 
    align-items: center; 
    gap: 10px;
}
.category-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 2px;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.movie-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    position: relative;
    cursor: pointer;
}
.movie-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.4); 
}
.movie-poster-wrapper {
    position: relative;
    padding-top: 150%; /* 2:3 Aspect Ratio */
    overflow: hidden;
}
.movie-poster {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.movie-card:hover .movie-poster { transform: scale(1.05); }

.movie-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.movie-card:hover .movie-overlay { opacity: 1; }
.play-icon {
    font-size: 3rem;
    color: #fff;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}

.movie-info { padding: 12px; }
.movie-title { 
    font-size: 0.95rem; 
    font-weight: 600; 
    margin-bottom: 5px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}
.movie-meta { 
    display: flex; 
    justify-content: space-between; 
    font-size: 0.8rem; 
    color: var(--text-muted); 
}
.rating-badge { color: #ffd700; display: flex; align-items: center; gap: 4px; }

/* --- SIDEBAR NEWS (Steam-like) --- */
.sidebar-box {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}
.sidebar-title { 
    font-size: 1.1rem; 
    margin-bottom: 15px; 
    color: #fff; 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    padding-bottom: 10px;
}
.news-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.news-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.news-thumb {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    background: #333;
}
.news-content h4 { font-size: 0.9rem; line-height: 1.3; margin-bottom: 5px; }
.news-content span { font-size: 0.75rem; color: var(--text-muted); }

/* --- AUTH PAGES --- */
.auth-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../img/auth-bg.jpg') center/cover no-repeat;
    position: relative;
}
.auth-wrapper::before {
    content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.8);
}
.auth-card {
    position: relative;
    z-index: 1;
    background: rgba(31, 33, 37, 0.95);
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}
.auth-card h2 { text-align: center; margin-bottom: 30px; font-size: 2rem; }
.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #fff;
    margin-bottom: 15px;
    font-size: 1rem;
    transition: border-color 0.3s;
}
.form-control:focus { outline: none; border-color: var(--primary-color); }
.btn-block { width: 100%; display: block; padding: 12px; font-size: 1rem; }

/* --- REMOVED OLD MOBILE STYLES --- */
