:root {
    /* Color Palette - Dark Theme for White Text */
    --bg-dark: #1a1a1a;
    --bg-darker: #252525;
    --glass-bg: rgba(30, 30, 30, 0.9);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: rgba(0, 0, 0, 0.3);

    --text-main: #ffffff;
    --text-muted: #cccccc;

    /* Warm Accents - Anti-Stress with Yellow Tones */
    --accent: #e8c896; /* Warm Yellow-Gold */
    --accent-hover: #d4b87a;
    --accent-cyan: #c9a86e; /* Warm Amber */

    --success: #8aad6b;
    --danger: #d47676;

    /* Intelligent Fluid Layout & Typography - 9% menos compacto */
    --nav-height: clamp(35px, 3.5vh + 17.5px, 52.5px);
    --fluid-gap: clamp(15px, 2.5vw + 10px, 40px);
    --card-min-width: clamp(180px, 14vw + 50px, 300px);
    --border-radius: clamp(14px, 1.5vw, 24px);
    --border-radius-sm: clamp(8px, 0.5vw, 12px);

    /* Fluid Font Sizes - Mejorados para mayor claridad */
    --font-h1: clamp(1.5rem, 2vw + 1rem, 2.1rem);
    --font-h2: clamp(1.35rem, 2vw + 0.6rem, 2.5rem);
    --font-card-title: clamp(1.15rem, 1.15vw + 0.7rem, 1.5rem);
    --font-body: clamp(0.95rem, 0.6vw + 0.7rem, 1.05rem);
    --font-small: clamp(0.8rem, 0.35vw + 0.65rem, 0.85rem);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Body scroll lock when modal is open */
body.modal-open { overflow: hidden; }



body {
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(30, 30, 30, 0.9) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(25, 25, 25, 0.85) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(30, 30, 30, 0.8) 0%, transparent 40%),
        radial-gradient(ellipse at 60% 20%, rgba(25, 25, 25, 0.75) 0%, transparent 45%),
        radial-gradient(ellipse at 10% 90%, rgba(30, 30, 30, 0.7) 0%, transparent 35%),
        radial-gradient(ellipse at 90% 10%, rgba(25, 25, 25, 0.65) 0%, transparent 40%),
        linear-gradient(180deg, #1a1a1a 0%, #252525 50%, #1a1a1a 100%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: calc(var(--nav-height) + 15px);
    padding-bottom: 150px;
    font-size: var(--font-body);
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: unset;
    position: relative;
    line-height: 1.5;
    letter-spacing: 0.01em;
}



/* Global Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-darker); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

/* Typography Overhaul */
h1, h2, h3, h4, .cart-label, .card-title { 
    font-family: 'Outfit', sans-serif; 
    font-weight: 800; 
    letter-spacing: -0.02em; 
}
a { color: var(--accent); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent-hover); }
.mt-2 { margin-top: clamp(15px, 2vw, 25px); }

.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Utility classes - Fixed .hidden to work properly with transitions */
.hidden { 
    display: none !important; 
}
.text-center { text-align: center; }
.w-100 { width: 100%; }
.cursor-pointer { cursor: pointer; }
.hidden-input { 
    position: absolute; 
    width: 1px; height: 1px; 
    padding: 0; margin: -1px; 
    overflow: hidden; clip: rect(0, 0, 0, 0); 
    white-space: nowrap; border: 0; 
}
.text-danger { color: var(--danger) !important; }

/* Premium Glassmorphism - Definido y Compacto */
.glass-panel {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ═══════════════════════════════════════════
   Elevated Buttons
   ═══════════════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: clamp(6px, 1vw, 10px);
    padding: clamp(10px, 1vw + 5px, 14px) clamp(16px, 1.5vw + 5px, 24px);
    border: none; border-radius: var(--border-radius-sm);
    font-size: var(--font-body); font-weight: 600; cursor: pointer;
    transition: var(--transition-fast); outline: none;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn:active { transform: scale(0.96); }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { 
    outline: 2px solid rgba(220, 38, 38, 0.6); 
    outline-offset: 2px; 
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    box-shadow: 0 4px 15px rgba(232, 200, 150, 0.25);
    font-weight: 700;
    letter-spacing: 0.02em;
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(232, 200, 150, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1); color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.15);
    font-weight: 600;
    letter-spacing: 0.01em;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text-main); background: rgba(255,255,255,0.1); }

.btn-icon {
    background: transparent; color: var(--text-muted);
    padding: 9.2px; font-size: clamp(1.1rem, 1.38vw, 1.29rem); border-radius: 50%;
}
.btn-icon:hover { color: var(--text-main); background: rgba(255,255,255,0.1); }



/* Header & Nav */
.glass-nav {
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(30, 30, 30, 0.98); backdrop-filter: none; -webkit-backdrop-filter: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); z-index: 100;
    padding: 8px 5%;
    display: flex; flex-direction: row; justify-content: center; align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    height: var(--nav-height);
}
.nav-container {
    display: flex; justify-content: center; align-items: center;
    gap: var(--fluid-gap); max-width: 1600px; margin: 0 auto; width: 100%;
    flex-wrap: nowrap;
}

.logo {
    display: flex; flex-direction: row; align-items: center; gap: 8px;
    text-decoration: none;
    transition: var(--transition-fast);
    flex-shrink: 0;
}
.logo:hover { transform: scale(1.02); }
.logo-content {
    display: flex; align-items: center; gap: 6px;
    font-size: clamp(1rem, 1.2vw + 0.3rem, 1.3rem);
    position: relative;
}
.logo h1 { font-size: clamp(1rem, 1.2vw + 0.3rem, 1.3rem); margin: 0; letter-spacing: -0.02em; }
.logo i { font-size: 1.1em; color: var(--accent-cyan); transition: color 0.3s ease; }
.logo:hover i { color: var(--accent); }
.logo-subtitle {
    display: none;
}

/* Admin Badge */
.admin-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
    color: #fff;
    padding: 2px 6px;
    border-radius: 12px;
    line-height: 1;
    margin-left: 6px;
}

/* Nav Stats */
.nav-stats {
    display: flex; align-items: center; gap: 9.2px;
}
.stat-pill {
    display: inline-flex; align-items: center; gap: 5.5px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 5.5px 12.9px;
    border-radius: 18.4px;
    font-size: var(--font-small);
    font-weight: 600;
    color: var(--accent-cyan);
}
.stat-pill i { font-size: 0.8rem; }

.search-bar { flex: 1 1 200px; max-width: 400px; position: relative; }
.search-bar i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--accent-cyan); font-size: 0.9rem; pointer-events: none; transition: all 0.3s ease; }
.search-bar input {
    width: 100%; padding: 6px 12px 6px 32px; border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(40, 40, 40, 0.8);
    color: var(--text-main); font-family: inherit; font-size: clamp(0.75rem, 0.8vw + 0.5rem, 0.85rem); transition: var(--transition-fast);
    font-weight: 500;
    letter-spacing: 0.01em;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar input:focus {
    outline: none; border-color: var(--accent-cyan);
    background: rgba(50, 50, 50, 0.9);
    box-shadow: 0 0 0 2px rgba(232, 200, 150, 0.15);
}
.search-bar:has(input:focus) i {
    color: var(--accent);
    transform: translateY(-50%) scale(1.1);
}
/* Clear search 'x' button styling */
.search-bar input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M18.3 5.71a1 1 0 0 0-1.41 0L12 10.59 7.11 5.7A1 1 0 0 0 5.7 7.11L10.59 12 5.7 16.89a1 1 0 1 0 1.41 1.41L12 13.41l4.89 4.89a1 1 0 0 0 1.41-1.41L13.41 12l4.89-4.89a1 1 0 0 0 0-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
    cursor: pointer;
}

/* Inline Filters */
.filter-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-select-compact {
    background: rgba(40, 40, 40, 0.8); color: var(--text-main); border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 24px 6px 10px; border-radius: 16px;
    outline: none; cursor: pointer; font-size: clamp(0.7rem, 0.75vw + 0.45rem, 0.8rem); font-weight: 600;
    transition: var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23ffffff' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    min-width: 80px;
}
.filter-select-compact:hover { background-color: rgba(50, 50, 50, 0.9); border-color: rgba(255, 255, 255, 0.25); }
.filter-select-compact:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(232, 200, 150, 0.2); }
.filter-select-compact option { background: #1a1a1a; color: var(--text-main); }

.actions { display: flex; align-items: center; gap: clamp(6px, 0.8vw, 10px); }

.btn-compact {
    padding: 6px 10px;
    font-size: clamp(0.7rem, 0.75vw + 0.45rem, 0.8rem);
    min-width: 32px;
}

/* ═══════════════════════════════════════════
   Filters
   ═══════════════════════════════════════════ */
.filters-container { 
    max-width: 1600px; margin: clamp(10px, 1.5vh, 20px) auto 0; 
    display: flex; gap: var(--fluid-gap); width: 100%; 
    flex-wrap: wrap;
}
.filter-select {
    background: rgba(40, 40, 40, 0.8); color: var(--text-main); border: 1px solid var(--glass-border);
    padding: clamp(8px, 1vh, 12px) clamp(12px, 1.5vw, 20px); border-radius: var(--border-radius-sm);
    outline: none; cursor: pointer; font-size: var(--font-body); font-weight: 600;
    transition: var(--transition-fast); flex: 1 1 auto; max-width: 300px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    letter-spacing: 0.01em;
}
.filter-select:hover { background-color: rgba(50, 50, 50, 0.9); border-color: rgba(255, 255, 255, 0.2); transform: translateY(-1px); }
.filter-select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(232, 200, 150, 0.2); }
.filter-select option { background: #1a1a1a; color: var(--text-main); }

/* ═══════════════════════════════════════════
   Dropdown
   ═══════════════════════════════════════════ */
.dropdown { position: relative; display: inline-block; }
.dropdown-content {
    display: none; position: absolute; right: 0; top: calc(100% + 10px);
    background: rgba(40, 40, 40, 0.95); backdrop-filter: blur(20px);
    min-width: 240px; border-radius: var(--border-radius);
    border: 1px solid var(--glass-border); box-shadow: 0 15px 40px rgba(0,0,0,0.6); z-index: 101; overflow: hidden;
}
.dropdown-content button, .dropdown-content label {
    color: var(--text-main); padding: 14.7px 18.4px; display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
    background: transparent; border: none; cursor: pointer; font-size: var(--font-body); font-weight: 500; transition: background 0.2s, padding-left 0.2s;
}
.dropdown-content button:hover, .dropdown-content label:hover { background: rgba(255,255,255,0.08); padding-left: 23px; }
.dropdown-divider { height: 1px; background: rgba(255,255,255,0.05); margin: 4.6px 0; }
.dropdown.active .dropdown-content { display: block; animation: slideDown 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

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

/* ═══════════════════════════════════════════
   Main Container
   ═══════════════════════════════════════════ */
.container { max-width: 1600px; margin: 0 auto; padding: clamp(20px, 3vh, 40px) 5%; }

/* Empty State */
.empty-state {
    text-align: center; padding: clamp(60px, 10vh, 140px) 20px; color: var(--text-muted);
    background: rgba(255,255,255,0.02); border-radius: clamp(16px, 2vw, 24px); border: 1px dashed rgba(255,255,255,0.15);
}
.empty-icon-wrapper {
    display: inline-flex; align-items: center; justify-content: center;
    width: clamp(80px, 10vw, 120px); height: clamp(80px, 10vw, 120px); border-radius: 50%;
    background: rgba(255, 255, 255, 0.1); color: var(--accent);
    margin-bottom: clamp(20px, 3vw, 30px);
}
.empty-state h2 { color: var(--text-main); margin-bottom: 13.8px; font-size: var(--font-h2); }
.empty-state p { font-size: var(--font-body); line-height: 1.6; max-width: 600px; margin: 0 auto; }

/* ═══════════════════════════════════════════
   Movie Grid & Cards
   ═══════════════════════════════════════════ */
.movie-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(var(--card-min-width), 1fr)); 
    gap: var(--fluid-gap); 
}
.movie-card {
    position: relative; border-radius: var(--border-radius); overflow: hidden;
    background: #2a2a2a; border: 2px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-fast); cursor: pointer; aspect-ratio: 2 / 3; display: flex; flex-direction: column;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
    animation: cardFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
    z-index: 10;
}
.movie-card:focus-visible {
    outline: 3px solid rgba(212, 165, 116, 0.6);
    outline-offset: 2px;
    border-radius: var(--border-radius);
}

.card-img-container { width: 100%; height: 100%; position: relative; overflow: hidden; background: #f5f0e8; }
.card-img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    filter: saturate(1.1) contrast(1.05);
}
.movie-card:hover .card-img { transform: scale(1.05); filter: saturate(1.15) contrast(1.08); }

/* Image loading skeleton */
.card-img[src=""] {
    background: linear-gradient(110deg, #3a3a3a 8%, #4a4a4a 18%, #3a3a3a 33%);
    background-size: 200% 100%;
}

.card-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(45, 35, 25, 0.95) 0%, rgba(45, 35, 25, 0.6) 40%, transparent 100%);
    padding: clamp(35px, 5vh, 50px) clamp(10px, 1.5vw, 20px) clamp(12px, 1.5vh, 18px); pointer-events: none;
    transition: var(--transition-fast);
}
.movie-card:hover .card-overlay { padding-bottom: clamp(18px, 2.5vh, 22px); }

/* Intelligent Text Truncation */
.card-title {
    font-size: var(--font-card-title); font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,0.9);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    line-height: 1.15;
    color: #ffffff;
    letter-spacing: -0.02em;
}
.card-original-title {
    font-size: clamp(0.65rem, 0.7vw + 0.4rem, 0.75rem);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    margin-top: 2px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    font-style: italic;
}
.card-category {
    font-size: var(--font-small); color: var(--accent); margin-top: 5px;
    text-transform: uppercase; letter-spacing: 0.15em; font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Selection Badge & Animation */
.select-badge {
    position: absolute; top: clamp(10px, 1.5vw, 15px); right: clamp(10px, 1.5vw, 15px);
    width: clamp(28px, 3vw, 36px); height: clamp(28px, 3vw, 36px);
    border-radius: 50%; background: rgba(212, 165, 116, 0.9); border: 2px solid rgba(212, 165, 116, 0.95);
    display: flex; align-items: center; justify-content: center; color: #fff;
    transition: var(--transition-fast); z-index: 2; backdrop-filter: none;
    font-size: clamp(0.9rem, 1vw, 1.1rem);
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
    opacity: 0;
    transform: scale(0.8);
}
.movie-card:hover .select-badge {
    opacity: 1;
    transform: scale(1);
}
.edit-badge {
    position: absolute; top: clamp(10px, 1.5vw, 15px); left: clamp(10px, 1.5vw, 15px);
    width: clamp(28px, 3vw, 36px); height: clamp(28px, 3vw, 36px);
    border-radius: 50%; background: rgba(0,0,0,0.7); border: 2px solid rgba(255,255,255,0.3);
    display: flex; align-items: center; justify-content: center; color: var(--text-muted);
    transition: var(--transition-fast); z-index: 2; backdrop-filter: none;
    opacity: 0;
}
.movie-card:hover .edit-badge {
    opacity: 1;
}
.edit-badge:hover {
    color: #fff; border-color: var(--accent-cyan); background: var(--accent-cyan);
    transform: scale(1.15); box-shadow: 0 4px 10px rgba(6, 182, 212, 0.4);
}
.movie-card.selected { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.5), 0 12px 28px rgba(212, 165, 116, 0.3); }
.movie-card.selected .card-img { opacity: 0.9; filter: grayscale(10%) contrast(1.08) brightness(1.05); }
.movie-card.selected .select-badge { 
    background: var(--accent); border-color: var(--accent); color: #fff; 
    transform: scale(1.25); font-size: clamp(0.9rem, 1vw, 1.2rem);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.5);
    opacity: 1;
}

/* ═══════════════════════════════════════════
   Floating Cart (Dock)
   ═══════════════════════════════════════════ */
@keyframes popInCart {
    0% { transform: translateX(-50%) translateY(150px) scale(0.8); opacity: 0; }
    60% { transform: translateX(-50%) translateY(-15px) scale(1.05); }
    100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}
@keyframes hideCart {
    0% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
    100% { transform: translateX(-50%) translateY(150px) scale(0.8); opacity: 0; }
}
@keyframes badgePulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 165, 116, 0.8); }
    50% { transform: scale(1.3); box-shadow: 0 0 0 12px rgba(212, 165, 116, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 165, 116, 0); }
}

.floating-cart {
    position: fixed; bottom: clamp(17.6px, 2.64vh, 26.4px); left: 50%;
    background: rgba(30, 30, 30, 0.95); backdrop-filter: none; -webkit-backdrop-filter: none;
    border: 1px solid var(--glass-border); border-radius: clamp(26.4px, 3.52vw, 35.2px);
    padding: clamp(8.8px, 1.32vh, 10.6px) clamp(13.2px, 1.76vw, 22px);
    display: flex; align-items: center; gap: clamp(13.2px, 1.76vw, 17.6px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    z-index: 99; transform: translateX(-50%) translateY(0); opacity: 1;
    animation: popInCart 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    width: max-content;
    max-width: 95%;
}
.floating-cart.hide-dock { animation: hideCart 0.4s ease forwards; pointer-events: none; }

.cart-info {
    display: flex; align-items: center; gap: clamp(9.2px, 1.38vw, 13.8px); font-weight: 600;
    padding: 7.4px clamp(9.2px, 1.38vw, 13.8px); border-radius: 27.6px; transition: var(--transition-fast); font-size: var(--font-body);
}
.cart-info:hover { background: rgba(255,255,255,0.08); transform: translateY(-1px); }
.cart-info:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
.cart-badge {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover)); color: #fff; 
    width: clamp(28px, 3vw, 36px); height: clamp(28px, 3vw, 36px); border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: var(--font-body); font-weight: 800; box-shadow: 0 4px 10px rgba(212, 165, 116, 0.4);
}
.cart-badge.pulse { animation: badgePulse 0.5s ease-out; }
.cart-label { margin: 0 4.6px; white-space: nowrap; }
.toggle-icon { font-size: var(--font-small); color: var(--text-muted); }
.cart-separator { width: 1px; height: 30px; background: rgba(255,255,255,0.1); }
.cart-actions { display: flex; gap: clamp(10px, 1.5vw, 15px); align-items: center;}

/* ═══════════════════════════════════════════
   Overlays (Loading, Drop Zone)
   ═══════════════════════════════════════════ */
.loading-overlay, .drop-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.95); backdrop-filter: none; z-index: 1000;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loading-overlay.hidden, .drop-overlay.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: flex !important; /* Override standard .hidden for transitions */
}
.drop-content { 
    text-align: center; color: var(--accent); border: 2px dashed rgba(212, 165, 116, 0.5); 
    padding: clamp(40px, 8vh, 80px); border-radius: clamp(20px, 3vw, 30px); background: rgba(212, 165, 116, 0.03); pointer-events: none; 
}
.drop-content h2 { color: var(--text-main); margin: 23px 0 13.8px; font-size: var(--font-h1); }
.drop-content p { color: var(--text-muted); font-size: var(--font-body); }

.spinner { 
    width: 60px; height: 60px; 
    margin-bottom: 25px;
    display: flex; align-items: center; justify-content: center;
}
.spinner i {
    font-size: 2rem;
    color: var(--accent);
    animation: spin 1s linear infinite;
}
.loading-overlay p { color: #ffffff; font-weight: 600; font-size: var(--font-body); letter-spacing: 0.05em; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════
   Modals
   ═══════════════════════════════════════════ */
.modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: none; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    opacity: 1; transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 18.4px;
    visibility: visible;
}
.modal.hidden { opacity: 0; visibility: hidden; pointer-events: none; display: flex !important; }

.modal-content {
    width: 100%; max-width: 480px; border-radius: clamp(16px, 2vw, 24px); padding: clamp(20px, 4vh, 35px);
    transform: scale(1) translateY(0); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh; display: flex; flex-direction: column;
}
.modal-lg { max-width: 600px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: clamp(15px, 2vh, 25px); flex-shrink: 0; }
.modal-header h2 { font-size: var(--font-h2); }
.close-modal-btn { 
    background: rgba(255,255,255,0.05); border: none; color: var(--text-muted); 
    width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; 
    cursor: pointer; transition: var(--transition); 
    display: flex; justify-content: center; align-items: center; 
    flex-shrink: 0;
}
.close-modal-btn:hover { color: #fff; background: rgba(255,255,255,0.1); transform: rotate(90deg); }
.close-modal-btn:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }

.modal-body { overflow-y: auto; flex-grow: 1; padding-right: 5px; }
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Form Groups */
.form-group { margin-bottom: clamp(15px, 2vh, 20px); }
.form-group label { display: block; margin-bottom: 8px; font-size: var(--font-small); font-weight: 500; color: var(--text-muted); }
.form-group input, .form-group select { 
    width: 100%; padding: clamp(10px, 1.5vh, 14px) 18px; border-radius: var(--border-radius-sm); 
    border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.4); 
    color: #fff; font-family: inherit; font-size: var(--font-body); transition: var(--transition);
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2); }
/* Validation styling */
.form-group input:invalid:not(:placeholder-shown) { border-color: var(--danger); }
.form-group input:valid:not(:placeholder-shown) { border-color: var(--success); }

/* Edit actions row */
.edit-actions { display: flex; gap: 9.2px; }

/* Selected List inside Modal */
.selected-list {
    list-style: none; margin: 0; padding: 0;
    border: 1px solid var(--glass-border); border-radius: var(--border-radius-sm);
    background: rgba(255, 250, 240, 0.5);
}
.selected-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: clamp(10px, 1.5vh, 16px) clamp(12px, 1.5vw, 20px); border-bottom: 1px solid var(--glass-border);
    font-size: var(--font-body); font-weight: 500; animation: slideInList 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.selected-list li:last-child { border-bottom: none; }
.selected-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80%; }
.remove-item { 
    color: var(--text-muted); background: rgba(255,255,255,0.05); width: clamp(30px, 3vw, 36px); height: clamp(30px, 3vw, 36px); 
    border: none; border-radius: 50%; cursor: pointer; font-size: 1.1rem; transition: var(--transition); 
    display: flex; justify-content: center; align-items: center; flex-shrink: 0;
}
.remove-item:hover { color: #fff; background: var(--danger); box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4); }
.remove-item:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
@keyframes slideInList { from { opacity: 0; transform: translateX(-15px); } to { opacity: 1; transform: translateX(0); } }
.modal-footer { margin-top: clamp(15px, 2.5vh, 25px); }

/* ═══════════════════════════════════════════
   Toasts
   ═══════════════════════════════════════════ */
.toast-container { position: fixed; top: clamp(13.8px, 2.76vh, 27.6px); right: clamp(13.8px, 2.76vw, 27.6px); z-index: 1000; display: flex; flex-direction: column; gap: 13.8px; pointer-events: none; }
.toast {
    background: rgba(18, 22, 33, 0.95); backdrop-filter: blur(20px); border-left: 4px solid var(--success); color: #fff;
    padding: clamp(12px, 2vh, 18px) clamp(16px, 2vw, 25px); border-radius: var(--border-radius-sm); box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex; align-items: center; gap: 15px; min-width: 280px; max-width: 420px; font-weight: 500; font-size: var(--font-body);
    animation: slideInToast 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    pointer-events: auto;
}
.toast i { font-size: 1.3rem; flex-shrink: 0; }
.toast.error { border-color: var(--danger); }
.toast.info { border-color: var(--accent-cyan); }
.toast.success { border-color: var(--success); }
@keyframes slideInToast { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(120%); opacity: 0; } }

/* ═══════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════ */
footer { 
    padding: clamp(20px, 4vh, 30px) 20px; 
    border-top: 1px solid rgba(255,255,255,0.05); 
    font-size: var(--font-small); color: var(--text-muted); text-align: center; 
}
.admin-link {
    color: var(--text-muted); opacity: 0.35; font-size: 0.75rem;
    text-decoration: none; transition: var(--transition-fast); display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
}
.admin-link:hover { opacity: 0.7; color: var(--text-muted); transform: translateY(-1px); }
.admin-link i { font-size: 0.85rem; }

/* ═══════════════════════════════════════════
   Animations
   ═══════════════════════════════════════════ */
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
    body { padding-top: calc(var(--nav-height) + 20px); }
    .floating-cart {
        flex-direction: column; width: calc(100% - 36.8px); border-radius: 22.1px; padding: 13.8px; gap: 13.8px; left: 18.4px; right: 18.4px; transform: none; bottom: 18.4px;
    }
    .cart-separator { display: none; }
    .cart-actions { flex-wrap: wrap; justify-content: center; width: 100%; }
    .cart-actions .btn { flex: 1; min-width: 130px; }

    .nav-stats { display: none; }
    .filter-inline { display: none; }
}

@media (max-width: 650px) {
    body { padding-top: calc(var(--nav-height) + 15px); }
    .logo {
        flex-shrink: 0;
    }
    .logo-content {
        gap: 4px;
    }
    .logo h1 { font-size: clamp(0.85rem, 2.5vw, 1rem); }
    .logo i { font-size: 1em; }
    .logo-subtitle {
        display: none;
    }
    .glass-nav {
        position: fixed;
        padding: 6px 8px;
        background: rgba(30, 30, 30, 0.98);
    }
    .nav-container {
        flex-wrap: nowrap;
        gap: 6px;
    }


    .search-bar {
        flex: 1;
        min-width: 120px;
        max-width: 200px;
    }
    .search-bar input {
        padding: 5px 10px 5px 28px;
        font-size: 0.75rem;
    }
    .search-bar i {
        left: 10px;
        font-size: 0.8rem;
    }

    
    .filter-inline {
        display: none;
    }

    .actions {
        gap: 4px;
    }
    .btn-compact {
        padding: 5px 8px;
        min-width: 28px;
        font-size: 0.75rem;
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
        padding: 0 10px;
    }
    .movie-card { aspect-ratio: 2 / 3; height: auto; }
    .card-title { font-size: 0.85rem; }
    .toast { min-width: unset; max-width: calc(100vw - 24px); }

    /* Pequeñas animaciones sutiles para móvil */
    .movie-card { animation: cardFadeIn 0.6s cubic-bezier(0.25, 1, 0.5, 1) both; }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
