/* ===== CSS VARIABLES ===== */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #181818;
    --bg-surface: #222;
    --bg-hover: #2a2a2a;
    --bg-input: #333;
    --text-primary: #fff;
    --text-secondary: #aaa;
    --text-muted: #666;
    --accent: #e50914;
    --accent-hover: #f40612;
    --accent-dark: #b20710;
    --gold: #f5c518;
    --success: #46d369;
    --warning: #ff9800;
    --danger: #e50914;
    --info: #0071eb;
    --sidebar-width: 260px;
    --navbar-height: 64px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);
    --transition: all 0.3s ease;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, select, textarea {
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid #444;
    border-radius: var(--radius);
    color: var(--text-primary);
    width: 100%;
    transition: var(--transition);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(229,9,20,0.2);
}
textarea { resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
hr { border: none; border-top: 1px solid #333; margin: 1rem 0; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted) !important; }
.text-danger { color: var(--danger) !important; }
.text-sm { font-size: 0.85rem; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1.05rem; }
.btn-full { width: 100%; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-surface); color: var(--text-primary); border: 1px solid #444; }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-outline { background: transparent; color: var(--text-primary); border: 2px solid #444; }
.btn-outline:hover { border-color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c0060f; }
.btn-success { background: var(--success); color: #000; }
.btn-warning { background: var(--warning); color: #000; }
.btn-premium { background: linear-gradient(135deg, #f5c518, #e6a800); color: #000; }
.btn-premium:hover { background: linear-gradient(135deg, #e6a800, #d49b00); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-sm { padding: 0.15rem 0.5rem; font-size: 0.7rem; }
.badge-premium { background: linear-gradient(135deg, #f5c518, #e6a800); color: #000; }
.badge-free { background: #333; color: var(--text-secondary); }
.badge-admin { background: var(--accent); color: #fff; }
.badge-movie { background: rgba(229,9,20,0.2); color: var(--accent); }
.badge-tv { background: rgba(0,112,235,0.2); color: var(--info); }
.badge-success { background: rgba(70,211,105,0.2); color: var(--success); }
.badge-warning { background: rgba(255,152,0,0.2); color: var(--warning); }
.badge-category { background: rgba(255,255,255,0.1); color: var(--text-secondary); }

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    z-index: 1000;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    transition: var(--transition);
}
.navbar.scrolled {
    background: rgba(10,10,10,0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.nav-container {
    padding: 0 3rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #fff;
}
.nav-logo span { color: var(--accent); }
.nav-toggle {
    display: none;
    font-size: 1.3rem;
    color: #fff;
    background: none;
    border: none;
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,0.1); }
.nav-link i { font-size: 0.85rem; }
.nav-user { display: flex; align-items: center; gap: 0.75rem; margin-left: 1rem; }
.nav-admin-link { color: var(--accent) !important; }
.nav-dropdown { position: relative; }
.nav-avatar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.08);
}
.nav-avatar:hover { background: rgba(255,255,255,0.1); }
.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #b20710);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}
.avatar-circle.avatar-lg { width: 80px; height: 80px; font-size: 2rem; }
.avatar-circle.avatar-sm { width: 28px; height: 28px; font-size: 0.75rem; }
.avatar-name { font-size: 0.9rem; font-weight: 500; }
.nav-avatar .fa-chevron-down { font-size: 0.7rem; color: var(--text-muted); }
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 210px;
    background: rgba(15,15,15,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    padding: 0.5rem;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
    transition: var(--transition);
}
.dropdown-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.dropdown-item.premium-cta { color: var(--gold); }
.dropdown-divider { margin: 0.25rem 0; border-color: rgba(255,255,255,0.08); }

/* ===== FLASH MESSAGES ===== */
.flash-container { padding: 0 3rem; }
.alert {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.3s ease;
}
.alert-success { background: rgba(70,211,105,0.15); border: 1px solid rgba(70,211,105,0.3); color: var(--success); }
.alert-danger { background: rgba(229,9,20,0.15); border: 1px solid rgba(229,9,20,0.3); color: var(--accent); }
.alert-warning { background: rgba(255,152,0,0.15); border: 1px solid rgba(255,152,0,0.3); color: var(--warning); }
.alert-info { background: rgba(0,112,235,0.15); border: 1px solid rgba(0,112,235,0.3); color: var(--info); }
.alert-close { background: none; border: none; color: inherit; font-size: 1.2rem; cursor: pointer; opacity: 0.7; }
.alert-close:hover { opacity: 1; }

/* ===== AUTH PAGE ===== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}
.auth-backdrop {
    position: fixed;
    inset: 0;
    background: url('https://assets.nflxext.com/ffe/siteui/vlv3/fc164b4b-f085-44ee-bb7f-ec7df8539f3e/3935f8a8-5336-42db-8ec3-830461123a9a/BD-en-20240828-TRIFECTA-perspective_WEB_70f8a380-09e0-4e16-8237-f3f555c09b87_large.jpg') center/cover no-repeat;
}
.auth-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
}
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}
.auth-card {
    background: rgba(20,20,20,0.9);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.05);
}
.auth-logo {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 3px;
    display: block;
    text-align: center;
    margin-bottom: 0.3rem;
}
.auth-logo span { color: var(--accent); }
.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    background: var(--bg-input);
    border-radius: var(--radius);
    overflow: hidden;
}
.auth-tab {
    flex: 1;
    padding: 0.7rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
    border: none;
    background: transparent;
    cursor: pointer;
}
.auth-tab.active { background: var(--accent); color: #fff; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); display: flex; align-items: center; gap: 0.4rem; }
.auth-footer-text { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-top: 1.5rem; }
.auth-footer-text a { color: var(--accent); }
.verify-icon { text-align: center; font-size: 3rem; color: var(--accent); margin: 1rem 0; }
.verify-text { text-align: center; color: var(--text-secondary); margin-bottom: 1.5rem; }
.otp-group { display: flex; justify-content: center; margin: 1.5rem 0; }
.otp-input {
    font-size: 2rem;
    text-align: center;
    letter-spacing: 1rem;
    padding: 0.8rem 1rem;
    width: 100%;
    max-width: 280px;
    font-weight: 700;
}

/* ===== MAIN CONTENT ===== */
.main-content { min-height: 100vh; }
.content-section { padding: 0 3rem 3rem; }
.page-container { padding: 80px 3rem 3rem; }
.page-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.page-header h1 { font-size: 1.8rem; font-weight: 800; display: flex; align-items: center; gap: 0.5rem; }
.page-count { color: var(--text-secondary); font-size: 1rem; }

/* ===== COVERFLOW 3D CAROUSEL ===== */
.coverflow-wrapper {
    position: relative;
    width: 100%;
    padding: 3rem 0 0;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.coverflow-carousel {
    width: 100%;
    height: 420px;
    perspective: 1600px;
    overflow: visible;
    position: relative;
    user-select: none;
}

.coverflow-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transform-style: preserve-3d;
}

.coverflow-track:active { cursor: grabbing; }

.coverflow-card {
    position: absolute;
    width: 280px;
    height: 380px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transform-style: preserve-3d;
    will-change: transform;
    backface-visibility: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    transition: box-shadow 0.3s ease;
}

.coverflow-card:hover { box-shadow: 0 15px 50px rgba(0,0,0,0.8); }

.coverflow-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.coverflow-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem 1rem;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%);
    pointer-events: none;
}

.coverflow-card-overlay h3 {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coverflow-card-overlay .coverflow-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.coverflow-card-overlay .coverflow-play {
    position: absolute;
    top: -32px;
    right: 0.5rem;
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(229,9,20,0.4);
}

.coverflow-card.active .coverflow-play {
    opacity: 1;
    transform: translateY(0);
}

.coverflow-card .coverflow-premium {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--gold);
    color: #000;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    pointer-events: none;
    z-index: 2;
}

.coverflow-card .coverflow-premium i { margin-right: 0.25rem; }

.coverflow-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.2s ease;
}

.coverflow-wrapper:hover .coverflow-arrow { opacity: 1; }

.coverflow-arrow:hover { background: var(--accent); border-color: var(--accent); }

.coverflow-arrow.prev { left: 1rem; }
.coverflow-arrow.next { right: 1rem; }

.coverflow-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
}

.coverflow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    padding: 0;
}

.coverflow-dot.active {
    background: var(--accent);
    width: 28px;
    border-radius: 4px;
}

.coverflow-featured {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 1rem 2rem 0;
    min-height: 100px;
}

.coverflow-featured h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.coverflow-featured p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.coverflow-featured .coverflow-featured-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.coverflow-featured .coverflow-featured-meta i { margin-right: 0.3rem; }

@media (max-width: 768px) {
    .coverflow-carousel { height: 320px; }
    .coverflow-card { width: 200px; height: 270px; border-radius: 12px; }
    .coverflow-card-overlay { padding: 1rem 0.75rem 0.75rem; }
    .coverflow-card-overlay h3 { font-size: 0.8rem; }
    .coverflow-featured h2 { font-size: 1.2rem; }
    .coverflow-arrow { width: 36px; height: 36px; font-size: 0.9rem; }
    .coverflow-arrow.prev { left: 0.5rem; }
    .coverflow-arrow.next { right: 0.5rem; }
}

@media (max-width: 480px) {
    .coverflow-carousel { height: 250px; }
    .coverflow-card { width: 150px; height: 210px; border-radius: 10px; }
    .coverflow-card-overlay { display: none; }
    .coverflow-wrapper { padding: 1.5rem 0 0; }
}

/* ===== SECTIONS ===== */
.section { margin-bottom: 2.5rem; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.section-title { font-size: 1.3rem; font-weight: 700; }
.section-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--transition);
}
.section-link:hover { color: #fff; }
.section-link i { font-size: 0.7rem; }

/* ===== MEDIA GRID ===== */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.2rem;
}
.media-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
}
.media-row::-webkit-scrollbar { height: 4px; }
.media-row::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }

/* ===== MEDIA CARD ===== */
.media-card {
    position: relative;
    overflow: visible;
    border-radius: var(--radius);
    background: var(--bg-card);
    cursor: pointer;
    transform-style: preserve-3d;
    will-change: transform;
}
.media-card:hover { z-index: 2; box-shadow: var(--shadow-lg); }
.media-card-horizontal {
    min-width: 160px;
    max-width: 160px;
    scroll-snap-align: start;
}
.card-link { display: block; }
.card-poster { position: relative; aspect-ratio: 2/3; overflow: hidden; }
.card-poster img { width: 100%; height: 100%; object-fit: cover; }
.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.media-card:hover .card-overlay { opacity: 1; }
.card-play {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}
.media-card:hover .card-play { transform: scale(1); }
.card-vip {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: linear-gradient(135deg, #f5c518, #e6a800);
    color: #000;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}
.card-info { padding: 0.7rem 0.8rem; }
.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.3rem;
}
.card-meta-row {
    display: flex;
    gap: 0.6rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    align-items: center;
}
.card-meta-row i { color: var(--gold); font-size: 0.65rem; }
.card-meta { font-size: 0.78rem; color: var(--text-muted); }
.watchlist-form { position: absolute; top: 0.5rem; left: 0.5rem; z-index: 3; }
.watchlist-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    transition: var(--transition);
}
.watchlist-btn:hover, .watchlist-btn.active { color: var(--accent); background: rgba(0,0,0,0.8); }
.watchlist-btn.active i { filter: drop-shadow(0 0 6px rgba(229,9,20,0.5)); }
.no-poster { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bg-surface); color: var(--text-muted); font-size: 2rem; }

/* ===== DETAIL PAGE ===== */
.detail-page { padding-top: var(--navbar-height); }
.detail-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60vh;
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.detail-backdrop-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--bg-primary) 0%, rgba(10,10,10,0.5) 50%, rgba(10,10,10,0.3) 100%);
}
.detail-container {
    position: relative;
    z-index: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.detail-layout {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 3rem;
    align-items: flex-start;
}
.detail-poster {
    flex-shrink: 0;
    width: 250px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.detail-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.detail-info { flex: 1; padding-top: 1rem; }
.detail-badges { display: flex; gap: 0.5rem; margin-bottom: 0.8rem; }
.detail-title { font-size: 2.2rem; font-weight: 900; line-height: 1.15; margin-bottom: 1rem; }
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.detail-meta i { margin-right: 0.3rem; color: var(--text-muted); }
.detail-cast, .detail-director { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 0.5rem; }
.detail-description { color: var(--text-secondary); font-size: 1rem; line-height: 1.7; margin: 1.2rem 0 1.5rem; }
.detail-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.detail-player { margin-bottom: 3rem; }
.video-container { position: relative; padding-bottom: 56.25%; border-radius: var(--radius-lg); overflow: hidden; background: #000; }
.video-container iframe, .video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== SEARCH ===== */
.search-page { padding-top: 1rem; }
.search-header { text-align: center; margin-bottom: 2rem; }
.search-header h1 { font-size: 2rem; font-weight: 800; }
.search-hint { color: var(--text-secondary); margin-top: 0.5rem; }
.search-form-large { margin-bottom: 2rem; }
.search-input-group {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 2px solid #444;
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    transition: var(--transition);
}
.search-input-group:focus-within { border-color: var(--accent); }
.search-input-group i { padding: 0 1rem; color: var(--text-muted); font-size: 1.2rem; }
.search-input-large {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    padding: 0.8rem 0;
    color: #fff;
}
.search-input-large:focus { outline: none; box-shadow: none; border-color: transparent; }
.search-input-group .btn { border-radius: var(--radius); padding: 0.8rem 1.5rem; }
.search-results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.search-results-header h2 { font-size: 1.2rem; font-weight: 600; }
.result-count { color: var(--text-secondary); }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; display: block; opacity: 0.5; }
.empty-state h3 { font-size: 1.3rem; margin-bottom: 0.5rem; color: var(--text-secondary); }
.empty-state p { margin-bottom: 1.5rem; }

/* ===== HOME LAYOUT ===== */
.home-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}
.home-main { flex: 1; min-width: 0; }
.home-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--navbar-height) + 2rem);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.sidebar-widget {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    border: 1px solid #222;
}
.widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}
.widget-title i { color: var(--accent); }
.category-select-wrap {
    position: relative;
}
.category-select {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: var(--radius);
    background: var(--bg-input);
    border: 1px solid #444;
    color: var(--text-primary);
    font-size: 0.9rem;
    appearance: none;
    cursor: pointer;
    transition: var(--transition);
}
.category-select:focus { border-color: var(--accent); outline: none; }
.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.75rem;
}
.trending-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.trending-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}
.trending-item:hover { background: var(--bg-hover); }
.trending-num {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-muted);
    width: 28px;
    text-align: center;
}
.trending-info { display: flex; flex-direction: column; gap: 0.15rem; }
.trending-title { font-size: 0.85rem; font-weight: 600; }
.trending-meta { font-size: 0.75rem; color: var(--text-muted); }
.premium-teaser {
    text-align: center;
    padding: 0.5rem 0;
}
.premium-teaser i { font-size: 2rem; color: var(--gold); margin-bottom: 0.5rem; }
.premium-teaser h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.3rem; }
.premium-teaser p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1rem; }

/* ===== PRICING ===== */
.pricing-page { text-align: center; padding-top: 2rem; }
.pricing-header { margin-bottom: 3rem; }
.pricing-header h1 { font-size: 2.5rem; font-weight: 900; }
.pricing-header p { color: var(--text-secondary); font-size: 1.1rem; margin-top: 0.5rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; max-width: 1000px; margin: 0 auto; }
.pricing-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    border: 1px solid #333;
    transition: var(--transition);
    position: relative;
}
.pricing-card:hover { transform: translateY(-4px); border-color: #555; }
.pricing-card-featured {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(229,9,20,0.15);
    transform: scale(1.05);
}
.pricing-card-featured:hover { transform: scale(1.05) translateY(-4px); }
.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    padding: 0.3rem 1.2rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}
.pricing-tier { font-size: 1.1rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 1rem; }
.pricing-price { margin-bottom: 1.5rem; }
.price-amount { font-size: 2.5rem; font-weight: 900; }
.price-period { color: var(--text-secondary); font-size: 0.95rem; }
.price-save { display: inline-block; background: rgba(70,211,105,0.15); color: var(--success); padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; margin-left: 0.5rem; }
.pricing-features { list-style: none; text-align: left; margin-bottom: 1.5rem; }
.pricing-features li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.pricing-features li i { color: var(--success); font-size: 0.8rem; }
.pricing-features li.disabled { opacity: 0.4; }
.pricing-features li.disabled i { color: var(--danger); }

/* ===== PROFILE ===== */
.profile-page { max-width: 800px; margin: 0 auto; }
.profile-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}
.profile-info h1 { font-size: 1.5rem; margin-bottom: 0.3rem; }
.profile-info p { color: var(--text-secondary); font-size: 0.9rem; }
.profile-badges { display: flex; gap: 0.5rem; margin: 0.5rem 0; }
.profile-joined { color: var(--text-muted); font-size: 0.85rem; }
.profile-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.profile-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid #333;
}
.profile-card h2 {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.profile-card-danger { border-color: rgba(229,9,20,0.3); }
.profile-card-danger h2 { color: var(--danger); }
.profile-card-premium { border-color: rgba(245,197,24,0.3); }
.profile-card-premium h2 { color: var(--gold); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-check-row { display: flex; gap: 2rem; margin: 1rem 0; flex-wrap: wrap; }
.check-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
}
.form-actions { display: flex; gap: 1rem; margin-top: 1.5rem; }

/* ===== GENRE TAGS ===== */
.genre-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.genre-chip {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
}
.genre-chip:hover, .genre-chip.active {
    background: rgba(229,9,20,0.15);
    border-color: var(--accent);
    color: #fff;
}

/* ===== ERROR PAGE ===== */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
}
.error-container { text-align: center; }
.error-code { font-size: 8rem; font-weight: 900; color: var(--accent); line-height: 1; }
.error-title { font-size: 1.8rem; font-weight: 700; margin: 0.5rem 0; }
.error-text { color: var(--text-secondary); margin-bottom: 2rem; }

/* ===== ADMIN LAYOUT ===== */
.admin-body { background: var(--bg-primary); }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid #222;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}
.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #222;
}
.sidebar-logo { font-size: 1.3rem; font-weight: 900; letter-spacing: 2px; }
.sidebar-logo span { color: var(--accent); }
.sidebar-badge {
    background: var(--accent);
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}
.sidebar-nav { flex: 1; padding: 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.8rem;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}
.sidebar-link:hover { background: var(--bg-hover); color: #fff; }
.sidebar-link.active { background: rgba(229,9,20,0.15); color: var(--accent); }
.sidebar-link i { width: 20px; text-align: center; }
.sidebar-divider { border-color: #333; margin: 0.5rem 0; }
.admin-main { flex: 1; margin-left: var(--sidebar-width); }
.admin-topbar {
    height: var(--navbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid #222;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}
.sidebar-toggle {
    display: none;
    font-size: 1.2rem;
    color: #fff;
    background: none;
    border: none;
}
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar-user { display: flex; align-items: center; gap: 0.5rem; color: var(--text-secondary); font-size: 0.9rem; }
.admin-content { padding: 2rem; }

/* ===== ADMIN CARDS ===== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.metric-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid #222;
}
.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: rgba(229,9,20,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.2rem;
    flex-shrink: 0;
}
.metric-value { font-size: 1.5rem; font-weight: 800; display: block; }
.metric-label { font-size: 0.8rem; color: var(--text-secondary); }
.admin-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid #222;
    overflow: hidden;
}
.admin-card .card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #222;
}
.admin-card .card-header h2 { font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.admin-grid { display: grid; gap: 1.5rem; }
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-card { padding: 2rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .span-2 { grid-column: span 2; }

/* ===== ADMIN TABLE ===== */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 0.8rem 1rem; text-align: left; font-size: 0.9rem; }
.admin-table th { background: rgba(0,0,0,0.3); color: var(--text-secondary); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px; }
.admin-table td { border-bottom: 1px solid #222; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.actions-cell { display: flex; gap: 0.4rem; }
.media-title-cell { display: flex; align-items: center; gap: 0.7rem; }
.table-thumb { width: 32px; height: 44px; object-fit: cover; border-radius: 4px; background: var(--bg-surface); }
.user-cell { display: flex; align-items: center; gap: 0.5rem; }
.page-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 1.5rem; }
.page-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.page-header-row .page-title { margin-bottom: 0; }

/* ===== FILTER BAR ===== */
.filter-bar { margin-bottom: 1.5rem; }
.filter-form { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid #444;
    border-radius: var(--radius);
    flex: 1;
    min-width: 200px;
}
.search-box i { padding: 0 0.75rem; color: var(--text-muted); }
.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.7rem 0.75rem 0.7rem 0;
}
.search-box input:focus { box-shadow: none; border-color: transparent; }
.filter-select {
    min-width: 150px;
    padding: 0.7rem 2rem 0.7rem 1rem;
    background: var(--bg-input);
}

/* ===== IMPORT ===== */
.import-stats { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.tmdb-results { min-height: 100px; padding: 1rem; }
.tmdb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.tmdb-card {
    background: var(--bg-surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #333;
}
.tmdb-poster { aspect-ratio: 2/3; overflow: hidden; }
.tmdb-poster img { width: 100%; height: 100%; object-fit: cover; }
.no-poster { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #222; color: #555; font-size: 2rem; }
.tmdb-info { padding: 0.7rem; }
.tmdb-info h4 { font-size: 0.85rem; margin-bottom: 0.3rem; }
.tmdb-info p { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.tmdb-info label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; cursor: pointer; }
.checkmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid #555;
    border-radius: 4px;
    background: transparent;
    flex-shrink: 0;
    transition: all 0.2s ease;
    position: relative;
}
input[type="checkbox"]:checked + .checkmark,
label:has(input[type="checkbox"]:checked) .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}
.checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.65rem;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
}
input[type="checkbox"]:checked + .checkmark::after,
label:has(input[type="checkbox"]:checked) .checkmark::after {
    opacity: 1;
}
.search-import-form { padding: 0.5rem 0; }

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
}
.page-link {
    padding: 0.5rem 1rem;
    background: var(--bg-surface);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}
.page-link:hover { background: var(--bg-hover); color: #fff; }
.page-info { color: var(--text-muted); font-size: 0.9rem; }

/* ===== MODAL ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 2rem;
}
.modal.active { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 480px;
    position: relative;
    box-shadow: var(--shadow-lg);
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
}
.modal-close:hover { color: #fff; }
.modal-content h2 { margin-bottom: 1.5rem; }

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid #333;
    box-shadow: var(--shadow);
    animation: slideInRight 0.3s ease;
    font-size: 0.9rem;
    max-width: 350px;
}
.toast-success { border-color: var(--success); }
.toast-error { border-color: var(--danger); }

/* ===== FOOTER ===== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid #222;
    padding: 3rem 3rem 1.5rem;
    margin-top: 3rem;
}
.footer-container { max-width: 1400px; margin: 0 auto; }
.footer-content { display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; margin-bottom: 2rem; }
.footer-logo { font-size: 1.3rem; font-weight: 900; letter-spacing: 2px; display: block; margin-bottom: 0.5rem; }
.footer-logo span { color: var(--accent); }
.footer-tagline { color: var(--text-muted); font-size: 0.9rem; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer-col h4 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.8rem; color: var(--text-secondary); }
.footer-col a { display: block; font-size: 0.9rem; color: var(--text-muted); padding: 0.25rem 0; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #222; padding-top: 1.5rem; text-align: center; font-size: 0.85rem; color: var(--text-muted); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .hero-title { font-size: 2.5rem; }
    .home-sidebar { width: 260px; }
    .detail-layout { flex-direction: column; align-items: center; text-align: center; }
    .detail-poster { width: 200px; }
    .detail-actions { justify-content: center; }
    .detail-meta { justify-content: center; }
}
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-menu {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10,10,10,0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateX(100%);
        transition: var(--transition);
    }
    .nav-menu.active { transform: translateX(0); }
    .nav-links { flex-direction: column; gap: 0.5rem; }
    .nav-user { margin-left: 0; }
    .home-layout { flex-direction: column; }
    .home-sidebar { width: 100%; position: static; }
    .media-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.8rem; }
    .content-section { padding: 0 1rem 2rem; }
    .page-container { padding: 80px 1rem 2rem; }
    .detail-container { padding: 1rem; }
    .detail-poster { width: 160px; }
    .pricing-grid { grid-template-columns: 1fr; }
    .pricing-card-featured { transform: none; }
    .profile-header { flex-direction: column; text-align: center; }
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.active { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .sidebar-toggle { display: block; }
    .admin-grid-2 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: span 1; }
    .footer-content { grid-template-columns: 1fr; gap: 2rem; }
    .footer-links { grid-template-columns: repeat(2, 1fr); }
    .admin-table { font-size: 0.8rem; }
    .admin-table th, .admin-table td { padding: 0.5rem; }
}
@media (max-width: 480px) {
    .media-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .hero-title { font-size: 1.6rem; }
    .hero { height: 60vh; min-height: 400px; }
    .metrics-grid { grid-template-columns: 1fr 1fr; }
    .error-code { font-size: 5rem; }
    .tmdb-grid { grid-template-columns: repeat(2, 1fr); }
}
