/**
 * StreamCore VOD CMS - Main Stylesheet
 * Responsive, Modern Dark Theme
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --secondary: #06b6d4;
    --accent: #f472b6;
    --dark: #0f0f1a;
    --darker: #050510;
    --light: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --surface: #1a1a2e;
    --surface-hover: #252542;
    --border: #2d2d4a;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

.text-muted { color: var(--gray-400); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

/* ========================================
   Layout
   ======================================== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-content {
    min-height: calc(100vh - 300px);
    padding-top: 80px;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    height: 70px;
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--light);
}

.nav-brand i {
    color: var(--primary);
    font-size: 1.75rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: space-between;
    margin-left: 3rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--gray-300);
    padding: 0.5rem 0;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-dropdown {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.dropdown-trigger i:last-child {
    font-size: 0.75rem;
    transition: var(--transition);
}

.nav-dropdown:hover .dropdown-trigger i:last-child {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.625rem 1rem;
    color: var(--gray-300);
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background: var(--surface-hover);
    color: var(--light);
}

.nav-search {
    position: relative;
}

.nav-search form {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    transition: var(--transition);
}

.nav-search form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.nav-search input {
    background: transparent;
    border: none;
    padding: 0.625rem 1.25rem;
    color: var(--light);
    width: 200px;
    outline: none;
}

.nav-search input::placeholder {
    color: var(--gray-500);
}

.nav-search button {
    background: transparent;
    border: none;
    padding: 0.625rem 1rem;
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition);
}

.nav-search button:hover {
    color: var(--primary);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu {
    position: relative;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: var(--light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.user-trigger:hover {
    background: var(--surface);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--gray-300);
    font-size: 0.9rem;
}

.user-dropdown a:hover {
    background: var(--surface-hover);
    color: var(--light);
}

.user-dropdown a.admin-link {
    color: var(--secondary);
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.5rem 0;
}

.user-dropdown a.logout-link:hover {
    color: var(--danger);
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--light);
    transition: var(--transition);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #9333ea);
    color: var(--light);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
}

.btn-secondary {
    background: var(--surface);
    color: var(--light);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--gray-600);
}

.btn-ghost {
    background: transparent;
    color: var(--light);
}

.btn-ghost:hover {
    background: var(--surface);
}

.btn-danger {
    background: var(--danger);
    color: var(--light);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: var(--success);
    color: var(--light);
}

.btn-success:hover {
    background: #059669;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   Forms
   ======================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-300);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--light);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.form-control::placeholder {
    color: var(--gray-500);
}

.form-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

.form-help {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.form-error {
    font-size: 0.85rem;
    color: var(--danger);
    margin-top: 0.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* ========================================
   Cards
   ======================================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--gray-600);
    box-shadow: var(--shadow-lg);
}

.card-body {
    padding: 1.5rem;
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--gray-900);
}

/* Movie Card */
.movie-card {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.movie-card-thumbnail {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.movie-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.movie-card:hover .movie-card-thumbnail img {
    transform: scale(1.05);
}

.movie-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
}

.movie-card:hover .movie-card-overlay {
    opacity: 1;
}

.movie-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), #9333ea);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-size: 1.25rem;
    opacity: 0;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.movie-card:hover .movie-card-play {
    opacity: 1;
}

.movie-card-play:hover {
    background: linear-gradient(135deg, var(--primary-hover), #7c3aed);
    transform: translate(-50%, -50%) scale(1.1);
}

.movie-card-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
}

.movie-card:hover .movie-card-favorite {
    opacity: 1;
}

.movie-card-favorite.active {
    opacity: 1;
    background: var(--primary);
}

.movie-card-favorite:hover {
    transform: scale(1.1);
}

.movie-card-info {
    padding: 1rem;
}

.movie-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--gray-400);
}

.movie-card-category {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--primary);
    color: var(--light);
    font-size: 0.75rem;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.movie-card-featured {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.25rem 0.5rem;
    background: var(--secondary);
    color: var(--dark);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

/* ========================================
   Movie Grid
   ======================================== */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .movie-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    margin-top: -80px;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--dark) 0%, rgba(20, 20, 20, 0.5) 50%, rgba(20, 20, 20, 0.3) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--gray-300);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--gray-400);
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-buttons .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ========================================
   Sections
   ======================================== */
.section {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.section-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 500;
}

.section-link:hover {
    gap: 0.75rem;
}

/* ========================================
   Auth Pages
   ======================================== */
.auth-page {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray-400);
}

.auth-social {
    margin-bottom: 1.5rem;
}

.auth-social button {
    width: 100%;
    padding: 0.875rem;
    background: var(--gray-800);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.auth-social button:hover {
    background: var(--gray-700);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--gray-500);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-400);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ========================================
   Movie Detail / Watch Page
   ======================================== */
.watch-page {
    min-height: calc(100vh - 70px);
}

.video-container {
    position: relative;
    background: var(--darker);
    aspect-ratio: 16/9;
    max-height: 80vh;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.movie-details {
    padding: 2rem 0;
}

.movie-details-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.movie-details-thumbnail {
    flex-shrink: 0;
    width: 300px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.movie-details-thumbnail img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.movie-details-info {
    flex: 1;
}

.movie-details-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.movie-details-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--gray-400);
}

.movie-details-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.movie-details-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.movie-details-description {
    color: var(--gray-300);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.movie-details-info-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.movie-details-info-item {
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius);
}

.movie-details-info-item label {
    display: block;
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.movie-details-info-item span {
    font-weight: 600;
}

/* ========================================
   User Dashboard
   ======================================== */
.dashboard-page {
    padding: 2rem 0;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    color: var(--gray-400);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: fit-content;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dashboard-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    color: var(--gray-300);
    transition: var(--transition);
}

.dashboard-nav a:hover {
    background: var(--surface-hover);
    color: var(--light);
}

.dashboard-nav a.active {
    background: var(--primary);
    color: var(--light);
}

.dashboard-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

/* Favorites Page */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.favorites-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-400);
}

.favorites-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--gray-600);
}

/* ========================================
   Admin Panel
   ======================================== */
.admin-page {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--darker);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.admin-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--light);
}

.admin-logo i {
    color: var(--primary);
    font-size: 1.5rem;
}

.admin-nav {
    padding: 1rem 0;
}

.admin-nav-section {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--gray-400);
    transition: var(--transition);
}

.admin-nav a:hover {
    background: var(--surface);
    color: var(--light);
}

.admin-nav a.active {
    background: var(--primary);
    color: var(--light);
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    background: var(--dark);
}

.admin-header {
    position: sticky;
    top: 0;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-header-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-user-info {
    text-align: right;
}

.admin-user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-user-role {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.admin-content {
    padding: 2rem;
}

/* Admin Stats */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background: rgba(229, 9, 20, 0.1);
    color: var(--primary);
}

.stat-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-icon.info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--gray-400);
    font-size: 0.9rem;
}

/* Admin Tables */
.admin-table-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.admin-table-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-table-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem 1.5rem;
    text-align: left;
}

.admin-table th {
    background: var(--gray-900);
    font-weight: 600;
    color: var(--gray-400);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table td {
    border-bottom: 1px solid var(--border);
}

.admin-table tr:hover td {
    background: var(--surface-hover);
}

.admin-table-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-table-actions .btn {
    padding: 0.5rem;
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}

/* Admin Forms */
.admin-form-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.admin-form-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

/* ========================================
   Alerts & Messages
   ======================================== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--info);
    color: var(--info);
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--gray-300);
    font-weight: 500;
    transition: var(--transition);
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--light);
}

.pagination a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--light);
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   Modal
   ======================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--gray-400);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--light);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ========================================
   Search Results
   ======================================== */
.search-results {
    padding: 2rem 0;
}

.search-header {
    margin-bottom: 2rem;
}

.search-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.search-query {
    color: var(--primary);
}

/* ========================================
   Category Page
   ======================================== */
.category-header {
    padding: 3rem 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.category-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.category-description {
    color: var(--gray-400);
    max-width: 600px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--darker);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.footer-brand p {
    color: var(--gray-400);
    margin: 1rem 0;
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-logo i {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: var(--light);
    transform: translateY(-3px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

.footer-column h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.footer-column a {
    display: block;
    color: var(--gray-400);
    padding: 0.375rem 0;
    font-size: 0.9rem;
}

.footer-column a:hover {
    color: var(--primary);
    padding-left: 0.5rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--gray-400);
}

.footer-bottom a:hover {
    color: var(--primary);
}

/* ========================================
   Utilities
   ======================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }
.d-grid { display: grid; }

.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 { width: 100%; }

/* ========================================
   Back to Top
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--light);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
}

/* ========================================
   Loading Spinner
   ======================================== */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--dark);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1.5rem;
        margin-left: 0;
        gap: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-auth {
        width: 100%;
        justify-content: center;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .movie-details-header {
        flex-direction: column;
    }
    
    .movie-details-thumbnail {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .section {
        padding: 2rem 0;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Tier Badges
   ======================================== */
.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary), #b2070f);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

.tier-badge.free {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.tier-badge.standard {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.tier-badge.family {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Mini tier badge for header/nav */
.tier-badge-mini {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.4rem;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tier-badge-mini.free {
    background: rgba(107, 114, 128, 0.3);
    color: #9ca3af;
}

.tier-badge-mini.standard {
    background: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.tier-badge-mini.family {
    background: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}
