        :root {
            --color-bg: #f5f5f5;
            --color-text: #333;
            --color-header: #8ac0ff;
            --color-header-text: #fff;
            --color-card-bg: #fff;
            --color-card-shadow: rgba(0,0,0,0.1);
            --color-table-th: #8ac0ff;
            --color-table-th-text: #fff;
            --color-table-td-bg: #fff;
            --color-table-td-hover: #f5f9ff;
            --color-btn: #8ac0ff;
            --color-btn-hover: #7ab0ef;
            --color-btn-active: #ffdd00;
            --color-btn-active-text: #333;
            --color-tag-bg: #f0f0f0;
            --color-tag-text: #666;
            --color-popup-bg: #fff;
            --color-popup-text: #333;
            --color-popup-shadow: rgba(0,0,0,0.2);
        }
        body {
            background-color: var(--color-bg);
            color: var(--color-text);
            font-family: 'Helvetica', sans-serif;
            margin: 0;
            padding: 0;
            user-select: none;
        }
        header {
            background-color: var(--color-header);
            color: var(--color-header-text);
            padding: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            position: relative;
            transition: background-color 0.3s;
        }
        h1 {
            margin: 0;
            font-size: 24px;
            cursor: pointer;
            transition: transform 0.3s;
        }
        h1:hover {
            transform: scale(1.02);
        }
        .header-buttons {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        .header-button {
            background-color: transparent;
            color: var(--color-header-text);
            font-size: 16px;
            cursor: pointer;
            border: none;
            font-weight: bold;
            padding: 8px 15px;
            transition: all 0.3s;
            border-radius: 4px;
        }
        .header-button.random-movie,
        .header-button.info {
            background-color: transparent;
            transition: all 0.3s ease;
        }
        .header-button.random-movie:hover,
        .header-button.info:hover {
            background-color: rgba(90, 57, 255, 0.3);
            transform: scale(1.05);
        }
        

        .container {
            width: 90%;
            max-width: 1400px;
            margin: 20px auto;
            scroll-margin-top: 20px;
        }
        .search-bar {
            margin-bottom: 20px;
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
            align-items: center;
        }
        .search-bar input {
            flex: 1;
            padding: 12px;
            font-size: 16px;
            border: 2px solid #ffdd00;
            border-radius: 6px;
            box-sizing: border-box;
            transition: all 0.3s;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            background-color: #fff;
        }
        .search-bar input:focus {
            outline: none;
            border-color: #8ac0ff;
        }
        .reset-button {
            background-color: transparent;
            color: #8ac0ff;
            border: none;
            padding: 10px;
            cursor: pointer;
            font-weight: bold;
            font-size: 16px;
            display: none;
            transition: all 0.3s;
        }
        .reset-button:hover {
            text-decoration: underline;
            transform: scale(1.05);
        }
        /* Vista de tabla */
        .table-view {
            display: none;
        }
        .gallery-view {
            display: block;
        }
        .view-toggle {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            justify-content: center;
        }
        .view-toggle button {
            background-color: transparent;
            color: var(--color-header-text);
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.3s;
        }
        .view-toggle button:hover {
            background-color: #ffdd00 !important;
            color: #23272a !important;
            transform: translateY(-2px);
        }
        .view-toggle button.active {
            background-color: var(--color-btn-active);
            color: var(--color-btn-active-text);
        }
        /* Estilos para la galería */
        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 20px;
            padding: 20px 0;
        }
        .gallery-pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            margin: 30px 0;
            flex-wrap: wrap;
        }
        .pagination-button {
            background: none !important;
            color: unset !important;
            border: none !important;
            font-size: 2rem;
            font-weight: 900;
            line-height: 1;
            transition: none;
            box-shadow: none !important;
        }
        .pagination-button:hover, .pagination-button:focus {
            color: unset !important;
            background: none !important;
        }
        body.dark-mode .pagination-button {
            color: #fff !important;
        }
        body.dark-mode .pagination-button:hover, body.dark-mode .pagination-button:focus {
            color: #ffdd00 !important;
        }
        .pagination-button.active {
            background-color: var(--color-btn-active);
            color: var(--color-btn-active-text);
        }
        .pagination-button:disabled {
            background-color: #ccc;
            cursor: not-allowed;
            transform: none;
        }
        .pagination-info {
            color: #666;
            font-size: 14px;
            margin: 0 15px;
        }
        .gallery-loading {
            text-align: center;
            padding: 40px;
            color: #666;
        }
        .gallery-loading .loading-spinner {
            margin: 0 auto 20px;
        }
        .movie-card {
            background: var(--color-card-bg);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 12px var(--color-card-shadow);
            transition: all 0.3s ease;
            cursor: pointer;
            position: relative;
        }
        .movie-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        }
        .movie-poster {
            width: 100%;
            height: 300px;
            background-color: #f0f0f0;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.2s ease;
        }
        .movie-poster::before {
            content: "Cargando...";
            color: #666;
            font-size: 14px;
        }
        .movie-poster.loaded::before {
            display: none;
        }
        .movie-info {
            padding: 15px;
        }
        .movie-title {
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 8px;
            color: var(--color-text);
            line-height: 1.3;
        }
        .movie-meta {
            font-size: 14px;
            color: #666;
            margin-bottom: 10px;
        }
        .movie-director {
            font-weight: bold;
            color: #8ac0ff;
        }
        .movie-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-top: 10px;
        }
        .movie-tag {
            background-color: var(--color-tag-bg);
            color: var(--color-tag-text);
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 11px;
        }
        .movie-actions {
            display: flex;
            gap: 8px;
            margin-top: 12px;
        }
        .movie-actions a {
            flex: 1;
            text-align: center;
            padding: 6px 8px;
            background-color: #8ac0ff;
            color: white;
            text-decoration: none;
            border-radius: 4px;
            font-size: 12px;
            font-weight: bold;
            transition: all 0.3s;
        }
        .movie-actions a:hover {
            background-color: #7ab0ef;
            transform: scale(1.05);
        }
        .new-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            background: #ffdd00;
            color: #333;
            font-size: 10px;
            padding: 4px 8px;
            border-radius: 10px;
            font-weight: bold;
            z-index: 2;
        }
        table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            margin-top: 20px;
            background-color: var(--color-bg);
            transition: background-color 0.4s;
        }
        table th, table td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid #8ac0ff !important;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 250px;
            background-color: var(--color-bg);
            transition: background-color 0.4s, color 0.4s, border-color 0.4s;
        }
        table thead {
            position: sticky;
            top: 0;
            z-index: 10;
        }
        table tr {
            transition: all 0.3s ease;
        }
        table tbody tr:hover {
            transform: scale(1.01);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            z-index: 1;
            position: relative;
        }
        table tbody tr:hover td {
            background-color: var(--color-table-td-hover);
        }
        table th {
            background-color: var(--color-table-th);
            color: var(--color-table-th-text);
            position: sticky;
            top: 0;
            z-index: 10;
            transform: none !important;
            cursor: pointer;
            transition: all 0.2s;
        }
        table th:hover {
            background-color: rgba(255, 221, 0, 0.15);
        }
        table th:active {
            transform: scale(0.98) !important;
            background-color: #69a0df;
        }
        .sortable {
            user-select: none;
        }
        .sort-asc::after {
            content: ' ↑';
            opacity: 0.8;
            font-family: sans-serif;
        }
        .sort-desc::after {
            content: ' ↓';
            opacity: 0.8;
            font-family: sans-serif;
        }
        .sortable::after {
            content: ' ↕';
            opacity: 0.8;
            transition: opacity 0.3s;
            font-family: sans-serif;
        }
        .sortable:hover::after {
            opacity: 1;
        }
        .director-link, .movie-link, .letterboxd-link, .year-link, .tag-link {
            text-decoration: none;
            color: inherit;
            cursor: pointer;
            transition: all 0.3s;
        }
        .movie-link:visited, .letterboxd-link:visited {
            color: #8ac0ff !important;
        }
        .director-link:hover, .movie-link:hover, .letterboxd-link:hover, .year-link:hover, .tag-link:hover {
            color: #8ac0ff;
        }
        .tag-link {
            display: inline-block;
            margin: 2px;
            padding: 2px 6px;
            background-color: var(--color-tag-bg);
            border-radius: 12px;
            font-size: 0.9em;
        }
        .tag-link:hover {
            background-color: #e0e0e0;
        }
        .visited-link {
            color: #8ac0ff !important;
        }
        .new-movie {
            position: relative;
        }
        .new-movie::after {
            content: 'NUEVO';
            position: absolute;
            top: -8px;
            right: -8px;
            background: #ffdd00;
            color: #333;
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 10px;
            font-weight: bold;
        }
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.9);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s;
        }
        .loading-overlay.visible {
            opacity: 1;
            visibility: visible;
        }
        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 3px solid #f3f3f3;
            border-top: 3px solid #8ac0ff;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        #infoPopup {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: var(--color-popup-bg);
            padding: 25px;
            border-radius: 10px;
            box-shadow: 0 4px 20px var(--color-popup-shadow);
            max-width: 400px;
            width: 90%;
            z-index: 1000;
            opacity: 0;
            transition: opacity 0.3s;
        }
        #infoPopup.visible {
            opacity: 1;
        }
        #infoPopup .popup-content {
            font-size: 16px;
            color: var(--color-popup-text);
        }
        #closeInfoButton {
            background-color: transparent;
            border: none;
            font-size: 20px;
            font-weight: bold;
            cursor: pointer;
            position: absolute;
            top: 10px;
            right: 10px;
            color: #8ac0ff;
            transition: all 0.3s;
        }
        #closeInfoButton:hover {
            color: #888;
            transform: scale(1.1);
        }
        #infoPopup .popup-content a {
            color: #8ac0ff;
            text-decoration: none;
            font-weight: bold;
            transition: all 0.3s;
        }
        #infoPopup .popup-content a:hover {
            color: #5a90df;
        }
        .scroll-to-top {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background-color: #8ac0ff;
            color: white;
            width: 45px;
            height: 45px;
            border-radius: 50%;
            border: none;
            font-size: 24px;
            font-weight: bold;
            cursor: pointer;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s;
            box-shadow: 0 2px 6px rgba(0,0,0,0.1);
            z-index: 1000;
        }
        .scroll-to-top.visible {
            opacity: 1;
            visibility: visible;
        }
        .scroll-to-top:hover {
            background-color: #7ab0ef;
            transform: translateY(-2px);
        }
        /* Estilos para el popup de película */
        #moviePopup {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        #moviePopup.visible {
            opacity: 1;
        }
        #closeMovieButton {
            position: absolute;
            top: 20px;
            right: 30px;
            background: none;
            border: none;
            color: white;
            font-size: 30px;
            cursor: pointer;
            z-index: 1001;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background-color: rgba(0, 0, 0, 0.5);
            transition: all 0.3s ease;
        }
        #closeMovieButton:hover {
            background-color: rgba(255, 255, 255, 0.2);
            transform: scale(1.1);
        }
        .movie-popup-content {
            background: var(--color-popup-bg);
            color: var(--color-popup-text);
            border-radius: 15px;
            max-width: 900px;
            width: 90%;
            max-height: 80vh;
            overflow: hidden;
            display: flex;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            transform: scale(0.8);
            transition: transform 0.3s ease;
        }
        #moviePopup.visible .movie-popup-content {
            transform: scale(1);
        }
        .movie-popup-poster {
            flex: 0 0 300px;
            background-color: #f0f0f0;
            position: relative;
        }
        .movie-popup-poster-img {
            width: 100%;
            height: 100%;
            background-size: contain;
            background-position: center;
            background-repeat: no-repeat;
        }
        .movie-popup-info {
            flex: 1;
            padding: 30px;
            overflow-y: auto;
        }
        .movie-popup-title {
            font-size: 28px;
            font-weight: bold;
            color: var(--color-popup-text);
            margin: 0 0 15px 0;
            line-height: 1.2;
        }
        .movie-popup-meta {
            display: flex;
            gap: 15px;
            margin-bottom: 25px;
            color: var(--color-popup-text);
            font-size: 16px;
        }
        .movie-popup-meta span,
        .movie-popup-meta a {
            padding: 0;
            background: none;
            border-radius: 0;
            font-weight: 400;
            text-decoration: underline;
        }
        body.dark-mode .movie-popup-meta span,
        body.dark-mode .movie-popup-meta a {
            color: #fff;
        }
        body:not(.dark-mode) .movie-popup-meta span,
        body:not(.dark-mode) .movie-popup-meta a {
            color: #23272a;
        }
        .movie-popup-synopsis h3 {
            font-size: 20px;
            color: var(--color-popup-text);
            margin: 0 0 15px 0;
            font-weight: bold;
        }
        .synopsis-text {
            font-size: 16px;
            line-height: 1.6;
            color: var(--color-popup-text);
            margin: 0;
            text-align: justify;
        }
        .movie-popup-actions {
            margin-top: 30px;
            display: flex;
            gap: 15px;
        }
        .movie-popup-actions a {
            padding: 12px 24px;
            border-radius: 8px;
            text-decoration: none;
            font-weight: bold;
            transition: all 0.3s ease;
            display: inline-block;
        }
        .movie-popup-watch {
            background-color: #8ac0ff;
            color: white;
        }
        .movie-popup-watch:hover {
            background-color: #7ab0ef;
            transform: translateY(-2px);
        }
        .movie-popup-letterboxd {
            background-color: #8ac0ff;
            color: white;
        }
        .movie-popup-letterboxd:hover {
            background-color: #7ab0ef;
            color: white;
            transform: translateY(-2px);
        }
        .movie-popup-year a, .movie-popup-director a {
            color: #333;
            text-decoration: none;
            font-weight: normal;
            border-bottom: 1px dashed #bbb;
            transition: color 0.2s, border-bottom 0.2s;
        }
        .movie-popup-year a:hover, .movie-popup-director a:hover {
            color: #8ac0ff;
            border-bottom: 1px solid #8ac0ff;
            cursor: pointer;
        }
        .movie-popup-duration {
            color: var(--color-popup-text);
        }
        @media (max-width: 600px) {
            header {
                flex-direction: row;
                align-items: center;
                justify-content: space-between;
                padding: 10px 10px;
                min-height: unset;
            }
            header h1 {
                position: static !important;
                width: auto !important;
                margin: 0;
                text-align: left;
                font-size: 19px;
                flex: 1;
            }
            .header-buttons {
                display: none !important;
            }
            .hamburger {
                display: block !important;
                background: none;
                border: none;
                font-size: 28px;
                color: #fff;
                cursor: pointer;
                margin-left: 10px;
                z-index: 1002;
            }
            .mobile-menu {
                display: none;
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                background: #8ac0ff;
                box-shadow: 0 2px 8px rgba(0,0,0,0.15);
                z-index: 1001;
                flex-direction: column;
                align-items: stretch;
                padding: 20px 0 10px 0;
                animation: slideDown 0.25s;
            }
            .mobile-menu.open {
                display: flex;
            }
            .mobile-menu .header-button {
                width: 90%;
                margin: 0 auto 10px auto;
                font-size: 17px;
                padding: 12px 0;
                background: #fff;
                color: #8ac0ff;
                border: none;
                border-radius: 6px;
                font-weight: bold;
                box-shadow: 0 2px 6px rgba(0,0,0,0.07);
                transition: all 0.2s;
            }
            .mobile-menu .header-button.active {
                background: #ffdd00;
                color: #333;
            }
            .mobile-menu .header-button:active {
                background: #e6e6e6;
            }
            .mobile-menu-bg {
                display: none;
                position: fixed;
                top: 0; left: 0; right: 0; bottom: 0;
                background: rgba(0,0,0,0.25);
                z-index: 1000;
            }
            .mobile-menu-bg.open {
                display: block;
            }
            @keyframes slideDown {
                from { transform: translateY(-40px); opacity: 0; }
                to { transform: translateY(0); opacity: 1; }
            }
            #closeMovieButton {
                left: 8px;
                right: auto;
                top: 8px;
                font-size: 28px;
            }
            /* Botón cerrar menú hamburguesa */
            .mobile-menu .close-mobile-menu {
                display: block;
                position: absolute;
                top: 10px;
                right: 16px;
                background: none;
                border: none;
                color: #fff;
                font-size: 32px;
                font-weight: bold;
                z-index: 1003;
                cursor: pointer;
            }
        }
        .gallery-filters {
            display: flex;
            justify-content: center;
            margin-bottom: 20px;
        }
        .gallery-filters select {
            padding: 0px 2px;
            border-radius: 6px;
            border: 2px solid #ffdd00;
            font-size: 11px;
            background: #fff;
            color: #333;
            box-sizing: border-box;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            outline: none;
            transition: all 0.3s;
            display: flex;
            align-items: center;
        }
        .gallery-filters select:focus {
            border: 2px solid #8ac0ff;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        .header-buttons {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        .header-button {
            background-color: transparent;
            color: var(--color-header-text);
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.3s;
        }
        .header-button:hover, .header-button:focus, .header-button.random-movie:hover, .header-button.info:hover, .view-toggle button:hover, .pagination-button:hover, #resetGalleryBtn:hover {
            background-color: #ffdd00 !important;
            color: #23272a !important;
            box-shadow: none !important;
            outline: none !important;
        }
        .header-button.info {
            margin-left: auto;
        }
        .goto-label {
            font-size: 14px;
            color: #888;
            margin-left: 8px;
            margin-right: 2px;
        }
        #gotoPageInput {
            width: 38px;
            padding: 4px 6px;
            border-radius: 5px;
            border: 1px solid #d0d0d0;
            text-align: center;
            font-size: 15px;
            margin: 0 2px;
            outline: none;
            transition: border 0.2s;
        }
        #gotoPageInput:focus {
            border: 1.5px solid #8ac0ff;
            background: #f8fbff;
        }
        /* Ajuste para asegurar visibilidad correcta de menús */
        .hamburger, .mobile-menu, .mobile-menu-bg {
            display: none;
        }
        @media (max-width: 600px) {
            .header-buttons {
                display: none !important;
            }
            .hamburger {
                display: block !important;
            }
        }
        @media (min-width: 601px) {
            .mobile-menu, .mobile-menu-bg {
                display: none !important;
            }
            .header-buttons {
                display: flex !important;
            }
            .hamburger {
                display: none !important;
            }
        }
        @media (max-width: 600px) {
            /* ... ajustes previos ... */
            #moviePopup {
                max-width: 98vw;
                width: 98vw;
                left: 50%;
                top: 0;
                transform: translate(-50%, 0);
                border-radius: 0 0 18px 18px;
                padding: 0;
                min-height: 60vh;
            }
            .movie-popup-content {
                flex-direction: column;
                padding: 0;
                max-height: 95vh;
                overflow-y: auto;
            }
            .movie-popup-poster {
                width: 100%;
                min-height: 220px;
                max-height: 45vw;
                display: flex;
                align-items: center;
                justify-content: center;
                border-radius: 0 0 12px 12px;
                overflow: hidden;
            }
            .movie-popup-poster-img {
                width: 100%;
                height: 100%;
                background-size: contain !important;
                background-position: center !important;
                background-repeat: no-repeat;
                border-radius: 0 0 12px 12px;
            }
            .movie-popup-info {
                padding: 18px 10px 10px 10px;
                font-size: 15px;
            }
            .movie-popup-title {
                font-size: 20px;
                margin-bottom: 8px;
                text-align: center;
            }
            .movie-popup-meta {
                font-size: 13px;
                margin-bottom: 10px;
                text-align: center;
            }
            .movie-popup-synopsis {
                margin-bottom: 12px;
            }
            .movie-popup-actions {
                flex-direction: column;
                gap: 8px;
                margin-top: 10px;
            }
            .movie-popup-actions a {
                font-size: 15px;
                padding: 10px 0;
            }
            #closeMovieButton {
                top: 8px;
                right: 8px;
                font-size: 28px;
            }
        }
        /* Tarjetas de lista para móvil */
        @media (max-width: 600px) {
          #tableView table { display: none !important; }
          #tableView .mobile-list-cards { display: block !important; }
        }
        @media (min-width: 601px) {
          #tableView .mobile-list-cards { display: none !important; }
        }
        .mobile-list-cards {
          display: none;
          margin-top: 12px;
        }
        .mobile-list-card {
          background: #fff;
          border-radius: 10px;
          box-shadow: 0 1px 4px rgba(0,0,0,0.07);
          margin-bottom: 10px;
          padding: 10px 10px 10px 12px;
          font-size: 15px;
          display: flex;
          flex-direction: row;
          align-items: center;
          gap: 10px;
        }
        .mobile-list-card .ml-main {
          flex: 1;
          display: flex;
          flex-direction: column;
          gap: 2px;
        }
        .mobile-list-card .ml-title {
          font-weight: bold;
          font-size: 16px;
          color: var(--color-text);
          margin-bottom: 2px;
        }
        .mobile-list-card .ml-meta {
          color: #666;
          font-size: 13px;
        }
        .mobile-list-card .ml-actions {
          display: flex;
          flex-direction: column;
          gap: 6px;
          margin-left: 8px;
        }
        .mobile-list-card .ml-actions a {
          background: #8ac0ff;
          color: #fff;
          text-align: center;
          padding: 7px 0;
          border-radius: 5px;
          font-weight: bold;
          text-decoration: none;
          font-size: 14px;
          transition: background 0.2s;
          min-width: 80px;
        }
        .mobile-list-card .ml-actions a:hover { background: #ffdd00; color: #333; }
        @media (max-width: 600px) {
          .movie-popup-actions {
            flex-direction: column !important;
            align-items: center !important;
            text-align: center !important;
          }
          .movie-popup-actions a {
            text-align: center !important;
            width: 100% !important;
            margin: 0 auto 8px auto !important;
            display: block !important;
          }
          header h1 {
            text-align: center !important;
            left: 0 !important;
            right: 0 !important;
            margin: 0 auto !important;
            width: 100% !important;
            position: static !important;
            font-size: 22px !important;
            padding: 0 !important;
          }
        }
        /* Modo oscuro */
        body.dark-mode {
            --color-bg: #181a1b;
            --color-text: #e0e0e0;
            --color-header: #23272a;
            --color-header-text: #e0e0e0;
            --color-card-bg: #23272a;
            --color-card-shadow: rgba(0,0,0,0.5);
            --color-table-th: #23272a;
            --color-table-th-text: #e0e0e0;
            --color-table-td-bg: #23272a;
            --color-table-td-hover: #23272a;
            --color-btn: #444b52;
            --color-btn-hover: #586069;
            --color-btn-active: #ffdd00;
            --color-btn-active-text: #23272a;
            --color-tag-bg: #33373a;
            --color-tag-text: #b0b0b0;
            --color-popup-bg: #23272a;
            --color-popup-text: #e0e0e0;
            --color-popup-shadow: rgba(0,0,0,0.7);
        }
        .main-header {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            align-items: center;
            padding: 0 20px;
            min-height: 60px;
            position: relative;
        }
        .header-left {
            display: flex;
            align-items: center;
            justify-content: flex-start;
        }
        .header-center {
            display: flex;
            justify-content: center;
            align-items: center;
            min-width: 0;
        }
        .header-center h1 {
            margin: 0;
            font-size: 24px;
            cursor: pointer;
            transition: transform 0.3s;
            text-align: center;
            width: 100%;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .header-right {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 8px;
        }
        .header-buttons {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        @media (max-width: 600px) {
            .main-header {
                grid-template-columns: auto 1fr auto;
                padding: 10px 10px;
                min-height: unset;
            }
            .header-center h1 {
                font-size: 19px;
            }
        }
        /* Filtros e input alineados */
        .search-bar {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            align-items: center;
        }
        .gallery-filters {
            margin: 0;
            display: flex;
            align-items: center;
        }
        .gallery-filters select {
            height: 48px;
            padding: 12px 16px;
            border-radius: 6px;
            border: 2px solid #ffdd00;
            font-size: 16px;
            background: #fff;
            color: #333;
            box-sizing: border-box;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            outline: none;
            transition: all 0.3s;
            display: flex;
            align-items: center;
        }
        .gallery-filters select:focus {
            border: 2px solid #8ac0ff;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        /* Ocultar botón modo oscuro del header en móvil */
        @media (max-width: 600px) {
            #darkModeBtn {
                display: none !important;
            }
        }
        body.dark-mode .mobile-menu {
            background: #23272a !important;
        }
        body.dark-mode .mobile-menu .header-button {
            color: #23272a !important;
        }
        body.dark-mode .mobile-menu .header-button.active {
            color: #fff !important;
        }
        body.dark-mode table th,
        body.dark-mode table td {
            border-bottom: 1px solid #8ac0ff !important;
        }
        /* Forzar líneas celestes en la tabla en todos los modos */
        table th, table td,
        body.dark-mode table th, body.dark-mode table td {
            border-bottom: 1px solid #8ac0ff !important;
        }
        body.dark-mode .movie-popup-duration {
            color: #fff !important;
        }
        body:not(.dark-mode) .movie-popup-duration {
            color: #333 !important;
        }
        body.dark-mode .movie-popup-meta span, body.dark-mode .movie-popup-meta, body.dark-mode .movie-popup-duration {
            color: #fff !important;
        }
        .movie-popup-duration a {
            font-weight: 400 !important;
            text-decoration: none;
            cursor: default;
        }
        body.dark-mode .movie-popup-duration a {
            color: #fff !important;
        }
        body:not(.dark-mode) .movie-popup-duration a {
            color: #333 !important;
        }
        /* Duración popup: máxima especificidad */
        .movie-popup-duration, .movie-popup-duration *, .movie-popup-meta span, .movie-popup-meta span * {
            color: #fff !important;
        }
        body.dark-mode .movie-popup-duration, body.dark-mode .movie-popup-duration *,
        body.dark-mode .movie-popup-meta span, body.dark-mode .movie-popup-meta span * {
            color: #333 !important;
        }

        /* Flechas de paginación */
        .pagination-button {
            color: #333 !important;
        }
        body.dark-mode .pagination-button {
            color: #fff !important;
        }
        body.dark-mode a.popup-link-year,
        body.dark-mode a.popup-link-director,
        body.dark-mode .movie-popup-duration a {
            color: #fff !important;
        }
        body:not(.dark-mode) a.popup-link-year,
        body:not(.dark-mode) a.popup-link-director,
        body:not(.dark-mode) .movie-popup-duration a {
            color: #23272a !important;
        }
        @media (max-width: 600px) {
            .gallery-filters select {
                width: 100%;
                box-sizing: border-box;
            }
        }
        @media (max-width: 600px) {
            .search-bar input,
            .gallery-filters select {
                width: 100% !important;
                box-sizing: border-box;
                border: 2px solid #ffdd00;
                border-radius: 6px;
                padding: 12px;
                font-size: 16px;
                margin: 0;
                display: block;
            }
        }
        @media (max-width: 600px) {
            #galleryOrderSelect option[value="az-title"] { display: block; }
            #galleryOrderSelect option:not([value="az-title"]) { display: block; }
        }
        #galleryOrderSelectDesktop { display: block; }
        #galleryOrderSelectMobile { display: none; }
        @media (max-width: 600px) {
            #galleryOrderSelectDesktop { display: none !important; }
            #galleryOrderSelectMobile { display: block !important; width: 100% !important; }
        }
        @media (max-width: 600px) {
            body.dark-mode .movie-title,
            body.dark-mode .ml-title {
                color: #fff !important;
            }
            .movie-poster {
                height: 400px;
                min-height: 320px;
                max-height: 60vw;