/* ============================================
   MOVIEFLIX - Premium Dark Streaming UI
   ============================================ */

/* ---------- Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #161622;
    --bg-card-hover: #1c1c2e;
    --bg-glass: rgba(22, 22, 34, 0.75);
    --bg-overlay: rgba(10, 10, 15, 0.85);
    
    --text-primary: #f0f0f5;
    --text-secondary: #9ca3b0;
    --text-muted: #6b7280;
    
    --accent: #e50914;
    --accent-hover: #f40612;
    --accent-gradient: linear-gradient(135deg, #e50914 0%, #ff6b35 100%);
    --accent-glow: 0 0 20px rgba(229, 9, 20, 0.3);
    
    --gold: #f5c518;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --border-color: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(229, 9, 20, 0.15);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    
    --navbar-height: 70px;
    --sidebar-width: 260px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

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

a:hover {
    color: var(--accent);
}

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

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ---------- Navbar ---------- */
.mf-navbar {
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    height: var(--navbar-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    transition: var(--transition);
}

.mf-navbar.scrolled {
    background: rgba(10, 10, 15, 0.98);
    box-shadow: var(--shadow);
}

.mf-brand {
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mf-navbar .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    position: relative;
}

.mf-navbar .nav-link:hover,
.mf-navbar .nav-link.active {
    color: var(--text-primary) !important;
}

.mf-navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

/* Search bar */
.mf-search {
    position: relative;
}

.mf-search input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border-radius: var(--radius-xl);
    width: 220px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.mf-search input:focus {
    width: 300px;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
    outline: none;
    background: rgba(255, 255, 255, 0.08);
}

.mf-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---------- Hero Section ---------- */
.mf-hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
    margin-top: var(--navbar-height);
}

.mf-hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    filter: brightness(0.55);
    transform: scale(1.05);
    animation: heroZoom 30s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    0% { transform: scale(1.05); }
    100% { transform: scale(1.12); }
}

.mf-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(10, 10, 15, 0.95) 0%,
        rgba(10, 10, 15, 0.7) 40%,
        rgba(10, 10, 15, 0.3) 70%,
        rgba(10, 10, 15, 0.1) 100%
    );
}

.mf-hero-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, var(--bg-primary) 0%, transparent 100%);
}

.mf-hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 5%;
}

.mf-hero-info {
    max-width: 580px;
}

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

.mf-hero-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.mf-hero-meta .badge-rating {
    background: var(--gold);
    color: #000;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.mf-hero-overview {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.7;
}

.mf-hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn-accent {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    padding: 0.7rem 1.8rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--accent-glow);
    color: #fff;
}

.btn-accent:active {
    transform: translateY(0);
}

.btn-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    padding: 0.7rem 1.8rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* ---------- Section Headers ---------- */
.mf-section {
    padding: 2rem 0;
}

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

.mf-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    position: relative;
    padding-left: 16px;
}

.mf-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.mf-section-link {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mf-section-link:hover {
    color: var(--accent);
}

/* ---------- Movie/Series Cards ---------- */
.mf-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
}

.mf-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-card);
    border: 1px solid transparent;
}

.mf-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-light);
    z-index: 5;
}

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

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

.mf-card:hover .mf-card-poster img {
    transform: scale(1.1);
    filter: brightness(0.7);
}

.mf-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;
    align-items: flex-end;
    padding: 1rem;
}

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

.mf-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 48px;
    height: 48px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.mf-card:hover .mf-card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.mf-card-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 2;
}

.mf-card-rating .star {
    color: var(--gold);
}

.mf-card-body {
    padding: 0.75rem;
}

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

.mf-card-year {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---------- Horizontal Scroll Row ---------- */
.mf-scroll-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.mf-scroll-row::-webkit-scrollbar {
    display: none;
}

.mf-scroll-row .mf-card {
    flex: 0 0 170px;
    scroll-snap-align: start;
}

/* ---------- Player ---------- */
.mf-player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.mf-player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.mf-player-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 15, 0.95);
    gap: 1rem;
    color: var(--text-secondary);
}

.mf-player-fallback i {
    font-size: 3rem;
    color: var(--accent);
}

/* ---------- Server Selector ---------- */
.mf-server-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.mf-server-btn {
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mf-server-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.mf-server-btn.active {
    border-color: var(--accent);
    background: rgba(229, 9, 20, 0.15);
    color: var(--accent);
}

.server-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.server-status.available { background: var(--success); box-shadow: 0 0 6px var(--success); }
.server-status.unavailable { background: var(--danger); }
.server-status.unknown { background: var(--warning); }
.server-status.checking { background: var(--info); animation: pulse 1.5s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ---------- Detail Page ---------- */
.mf-detail-backdrop {
    position: relative;
    min-height: 500px;
    margin-top: var(--navbar-height);
    overflow: hidden;
}

.mf-detail-backdrop-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.4) blur(2px);
}

.mf-detail-backdrop::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(to top, var(--bg-primary), transparent);
    z-index: 1;
}

.mf-detail-content {
    position: relative;
    z-index: 2;
    padding: 3rem 0;
}

.mf-detail-poster {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    max-width: 300px;
    border: 2px solid var(--border-light);
}

.mf-detail-poster img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.mf-detail-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.mf-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.mf-detail-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mf-genre-badge {
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.mf-genre-badge:hover {
    background: rgba(229, 9, 20, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.mf-detail-overview {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ---------- Cast ---------- */
.mf-cast-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.mf-cast-grid::-webkit-scrollbar { display: none; }

.mf-cast-card {
    flex: 0 0 110px;
    text-align: center;
}

.mf-cast-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.mf-cast-name {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mf-cast-char {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Episode List ---------- */
.mf-episode-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mf-episode-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
    align-items: center;
}

.mf-episode-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateX(4px);
}

.mf-episode-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-muted);
    min-width: 40px;
    text-align: center;
}

.mf-episode-thumb {
    width: 160px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 16/9;
}

.mf-episode-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mf-episode-info {
    flex: 1;
    min-width: 0;
}

.mf-episode-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.mf-episode-overview {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Season Selector ---------- */
.mf-season-select {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
    appearance: auto;
}

/* ---------- Glassmorphism Stat Cards (Admin) ---------- */
.mf-stat-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.mf-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-gradient);
    opacity: 0.08;
    transform: translate(20px, -20px);
}

.mf-stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
    box-shadow: var(--shadow-glow);
}

.mf-stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mf-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ---------- Admin Sidebar ---------- */
.mf-admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    z-index: 1040;
    padding: 1.5rem 0;
    overflow-y: auto;
    transition: var(--transition);
}

.mf-admin-sidebar .nav-link {
    padding: 0.7rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.mf-admin-sidebar .nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.mf-admin-sidebar .nav-link.active {
    color: var(--accent);
    background: rgba(229, 9, 20, 0.08);
    border-left-color: var(--accent);
}

.mf-admin-main {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
}

/* ---------- Tables (Admin) ---------- */
.mf-table {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.mf-table .table {
    color: var(--text-primary);
    margin-bottom: 0;
}

.mf-table .table th {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0.8rem 1rem;
}

.mf-table .table td {
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    vertical-align: middle;
    font-size: 0.9rem;
}

.mf-table .table tbody tr:hover {
    background: var(--bg-card-hover);
}

/* ---------- Forms ---------- */
.mf-form-control {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-light) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius) !important;
    padding: 0.65rem 1rem !important;
    transition: var(--transition) !important;
}

.mf-form-control:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.12) !important;
}

.mf-form-control::placeholder {
    color: var(--text-muted) !important;
}

/* ---------- Toast Notifications ---------- */
.mf-toast-container {
    position: fixed;
    top: calc(var(--navbar-height) + 1rem);
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mf-toast {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 0.9rem;
    animation: toastSlideIn 0.4s ease;
    box-shadow: var(--shadow);
    min-width: 280px;
}

.mf-toast.success { border-left: 3px solid var(--success); }
.mf-toast.danger { border-left: 3px solid var(--danger); }
.mf-toast.warning { border-left: 3px solid var(--warning); }
.mf-toast.info { border-left: 3px solid var(--info); }

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ---------- Skeleton Loading ---------- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 400% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-poster {
    aspect-ratio: 2/3;
    width: 100%;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    width: 80%;
}

.skeleton-text-sm {
    height: 10px;
    width: 50%;
}

/* ---------- Auth Pages ---------- */
.mf-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(ellipse at center, rgba(229, 9, 20, 0.05) 0%, var(--bg-primary) 70%);
}

.mf-auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.mf-auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* ---------- Watchlist/Favorites Buttons ---------- */
.mf-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.mf-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    transform: scale(1.1);
}

.mf-action-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ---------- Pagination ---------- */
.pagination .page-item .page-link {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.pagination .page-item .page-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    color: var(--accent);
}

.pagination .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ---------- Footer ---------- */
.mf-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.mf-footer-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.mf-footer-link {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    transition: var(--transition-fast);
}

.mf-footer-link:hover {
    color: var(--accent);
    padding-left: 4px;
}

.mf-footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ---------- Mobile Bottom Nav ---------- */
.mf-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    z-index: 1040;
    padding: 0.5rem 0;
}

.mf-bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mf-bottom-nav-items a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.3rem 0.5rem;
    transition: var(--transition-fast);
}

.mf-bottom-nav-items a i {
    font-size: 1.2rem;
}

.mf-bottom-nav-items a.active,
.mf-bottom-nav-items a:hover {
    color: var(--accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .mf-hero {
        height: 60vh;
        min-height: 400px;
    }
    
    .mf-hero-title {
        font-size: 1.8rem;
    }
    
    .mf-admin-sidebar {
        transform: translateX(-100%);
    }
    
    .mf-admin-sidebar.show {
        transform: translateX(0);
    }
    
    .mf-admin-main {
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    .mf-bottom-nav {
        display: block;
    }
    
    body {
        padding-bottom: 65px;
    }
    
    .mf-hero {
        height: 55vh;
        min-height: 350px;
    }
    
    .mf-hero-title {
        font-size: 1.5rem;
    }
    
    .mf-hero-overview {
        -webkit-line-clamp: 2;
        font-size: 0.9rem;
    }
    
    .mf-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.75rem;
    }
    
    .mf-scroll-row .mf-card {
        flex: 0 0 140px;
    }
    
    .mf-detail-poster {
        max-width: 200px;
        margin: 0 auto 1.5rem;
    }
    
    .mf-episode-thumb {
        width: 100px;
    }
    
    .mf-section-title {
        font-size: 1.1rem;
    }
    
    .mf-footer {
        padding: 2rem 0 1rem;
    }
}

@media (max-width: 575.98px) {
    .mf-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    
    .mf-server-selector {
        gap: 0.4rem;
    }
    
    .mf-server-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* ---------- Badge Overrides (Bootstrap) ---------- */
.badge.bg-success-soft { background: rgba(34, 197, 94, 0.15) !important; color: var(--success) !important; }
.badge.bg-warning-soft { background: rgba(245, 158, 11, 0.15) !important; color: var(--warning) !important; }
.badge.bg-danger-soft { background: rgba(239, 68, 68, 0.15) !important; color: var(--danger) !important; }
.badge.bg-info-soft { background: rgba(59, 130, 246, 0.15) !important; color: var(--info) !important; }

/* ---------- No Poster/Backdrop SVG placeholder ---------- */
.no-image-placeholder {
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}
