* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-y: scroll; /* Forzar scrollbar siempre visible como en search */
    --film-border-color: #cbd5e1;
    --header-color: #f1f5f9;
}

body::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.container {
    width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    overflow-x: hidden; /* Cambiado de visible a hidden para evitar problemas con el menú móvil */
    overflow-y: visible; /* Allow sticky navbar to work */
    min-height: 100vh;
    padding-bottom: 100px;
}

.footer-title {
    font-size: var(--font-sm);
    font-weight: 600;
}

.footer-legend {
    text-align: center;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    padding: 20px;
    color: #64748b;
    font-size: var(--font-sm);
    line-height: 1.6;
    z-index: 10;
    pointer-events: none;
}

.search-container {
    padding: 30px 8px;
    background: url("/src/images/videoteca_24fps_optimized.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 140px;
    margin-bottom: 50px;
}

.search-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 100%
    );
    pointer-events: none;
}

.search-stats {
    text-align: center;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--font-sm);
    z-index: 2;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.lists-section {
    margin: 0 8px 24px 8px;
    overflow: visible;
}

.section-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
}

.film-strip-container {
    width: 100%;
    height: 230px;
    position: relative;
    overflow: hidden;
    overflow-x: auto;
    margin: -35px 0;
    cursor: grab;
    user-select: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: transparent !important;
}

.film-strip-container::-webkit-scrollbar {
    display: none;
}

.film-strip-container:active {
    cursor: grabbing;
}

.film-strip {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    will-change: transform;
    min-width: 100%;
    background: transparent !important;
}

.film-strip svg {
    height: 100%;
    flex-shrink: 0;
}

.film-frame {
    position: absolute;
    width: 220px;
    height: 165px;
    border-radius: 6px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--film-border-color, #e2e8f0);
}

.film-frame:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.film-frame::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 1;
}

.film-frame-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
    color: white;
}

.film-frame h4 {
    margin: 0;
    font-size: var(--font-filter);
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
}

.film-stats-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-base);
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 3;
}

.film-frame:hover .film-stats-icon {
    opacity: 1;
    transform: scale(1);
}

.film-stats-icon:hover {
    background: rgba(59, 130, 246, 0.9);
    transform: scale(1.1);
}

.film-controls {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 20;
}

.film-control-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: var(--font-lg);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.film-control-btn:hover {
    background: rgba(59, 130, 246, 0.9);
    transform: scale(1.1);
}

/* Contenedor para mensajes cuando no hay resultados */
.lists-grid {
    display: block;
}

.loading-state {
    text-align: center;
    padding: 60px 0;
    color: #64748b;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.error-state {
    text-align: center;
    padding: 60px 0;
    color: #dc2626;
}

/* Dark theme styles */
.dark-theme {
    color: var(--text-primary);
    --film-border-color: #475569;
    --header-color: #1e293b;
}

.dark-theme .container {
    border: none;
    box-shadow: none;
    min-height: 100vh;
}
.dark-theme .footer-title {
    color: #f1f5f9;
}

.dark-theme .footer-legend {
    color: #94a3b8;
}

.dark-theme .footer-illustration {
    background: var(--bg-primary);
    border-top: 1px solid rgba(71, 85, 105, 0.5);
}

.dark-theme .search-container {
    background: url("/src/images/videoteca_24fps_optimized.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.dark-theme .search-container::before {
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 100%
    );
}

.dark-theme .search-stats {
    color: rgba(226, 232, 240, 0.9);
}

.dark-theme .loading-state {
    color: #94a3b8;
}

.dark-theme .loading-spinner {
    border-color: #374151;
    border-top-color: #60a5fa;
}

.dark-theme .error-state {
    color: #fca5a5;
}

/* Dark theme for film strip */
.dark-theme .film-frame {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    border-color: var(--film-border-color, #475569);
}

.dark-theme .film-frame:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
}

.dark-theme .film-frame::before {
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

.dark-theme .film-frame h4 {
    color: #f1f5f9;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.dark-theme .film-stats-icon {
    background: rgba(15, 23, 42, 0.8);
    color: #f1f5f9;
}

.dark-theme .film-stats-icon:hover {
    background: rgba(59, 130, 246, 0.9);
}

.dark-theme .film-control-btn {
    background: rgba(15, 23, 42, 0.8);
    color: #f1f5f9;
}

.dark-theme .film-control-btn:hover {
    background: rgba(59, 130, 246, 0.9);
}

/* ELIMINADO: CSS de navbar movido a navbar.css para unificación */

/* Móvil - Ajustes de footer */
@media (max-width: 768px) {
    .search-container {
        padding: 20px 8px;
    }
    .lists-section {
        margin: 0 6px 20px 6px;
    }
    .footer-legend {
        font-size: var(--font-xs);
        padding: 10px;
        line-height: 1.4;
    }

    .footer-title {
        font-size: var(--font-sm);
    }
}
