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

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #17a2b8;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1fc4dc, #17a2b8);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #17a2b8 rgba(0, 0, 0, 0.3);
}

html,
body {
    background: #000;
    margin: 0;
    padding: 0;
    color: white;
}

body {
    font-family: "Arial", sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

header {
    background: #000000;
    color: white;
    padding: 1rem 1.25rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 0;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 1rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
    order: 3;
}

.sidebar-toggle img {
    filter: brightness(0) invert(1);
}

/* .sidebar-toggle:hover img {
    transform: scale(1.1);
} */

.logo-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: auto;
}

.logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

header h1 {
    font-family: "Orbitron", sans-serif;
    font-size: 2rem;
    text-align: left;
    margin: 0;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0;
    z-index: 10;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    order: 1;
}

.search-preview {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 10px;
    max-height: 360px;
    overflow-y: auto;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-preview-item {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s;
}

.search-preview-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-preview-item:last-child {
    border-bottom: none;
}

.search-preview-poster {
    width: 40px;
    height: 60px;
    border-radius: 5px;
    margin-right: 1rem;
    object-fit: cover;
}

.search-preview-info {
    flex: 1;
}

.search-preview-title {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.search-preview-meta {
    color: #ccc;
    font-size: 0.8rem;
}

.search-preview-badge {
    background: #17a2b8;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.search-preview-badge[data-type="movie"] {
    background: #9b59b6;
}

.search-preview-badge[data-type="ova"] {
    background: #ff9500;
}

.search-preview-badge[data-type="serie"] {
    background: #0053cc;
}

#searchInput:focus {
    border-color: #17a2b8;
}

.search-container:focus-within .desktop-search-btn img {
    filter: brightness(0) saturate(100%) invert(58%) sepia(60%) saturate(400%)
        hue-rotate(155deg);
}

#searchInput {
    padding: 0 1rem 0 2.6rem;
    width: 260px;
    height: 40px;
    border: 2px solid #333;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition:
        width 0.3s ease,
        opacity 0.3s ease,
        transform 0.3s ease;
    transform-origin: right;
    position: relative;
    background: #000000;
    color: white;
}

#searchInput::placeholder {
    font-size: 15px;
}

#searchInput.collapsed {
    width: 0;
    padding: 0.8rem 0;
    opacity: 0;
    transform: scaleX(0);
}

.desktop-search-btn {
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    transition: transform 0.2s;
    position: absolute;
    padding: 1rem;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.desktop-search-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

.desktop-search-btn img {
    filter: brightness(0) invert(1);
}

.search-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    -webkit-tap-highlight-color: transparent;
    align-items: center;
    justify-content: center;
}

.search-toggle img {
    filter: brightness(0) invert(1);
}

.search-toggle:hover img {
    transform: scale(1.1);
}

.mobile-search {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    background: rgba(10, 10, 15, 0.98);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: none;
    z-index: 201;
}

.mobile-search.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-search-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 0.6rem;
    gap: 0.6rem;
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
}

.mobile-search input {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    padding: 0.5rem 0.8rem 0.5rem 2.6rem;
    border: 2px solid #333;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    background: #000000;
    color: white;
    transition: border-color 0.2s;
    height: 42px;
    box-sizing: border-box;
    line-height: 1.25;
}

.mobile-search-icon {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
    margin-left: 0.85rem;
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    pointer-events: none;
    z-index: 1;
}

.close-mobile-search {
    grid-column: 2;
    grid-row: 1;
    background: transparent;
    border: 2px solid rgba(255, 59, 92, 0.8);
    color: rgba(255, 59, 92, 0.9);
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    transition:
        background 0.2s,
        border-color 0.2s;
    flex-shrink: 0;
}

.mobile-search input:focus {
    border-color: #17a2b8;
}

.mobile-search input::placeholder {
    font-size: 15px;
}

.mobile-search-header:focus-within .mobile-search-icon {
    filter: brightness(0) saturate(100%) invert(58%) sepia(60%) saturate(400%)
        hue-rotate(155deg);
}

.close-mobile-search:hover {
    background: rgba(255, 59, 92, 0.1);
    border-color: rgba(255, 59, 92, 1);
}

.mobile-search-preview {
    position: fixed;
    left: 0;
    right: 0;
    background: #0a0a0f;
    border-radius: 0 0 10px 10px;
    overflow-y: auto;
    z-index: 10000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    display: none;
}

.mobile-search-item {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s;
}

.mobile-search-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-search-item:last-child {
    border-bottom: none;
}

.mobile-search-poster {
    width: 45px;
    height: 65px;
    border-radius: 6px;
    margin-right: 0.8rem;
    object-fit: cover;
}

.mobile-search-info {
    flex: 1;
}

.mobile-search-title {
    color: white;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.mobile-search-meta {
    color: #aaa;
    font-size: 0.8rem;
}

.mobile-search-badge {
    background: #17a2b8;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
}

.mobile-search-badge[data-type="movie"] {
    background: #9b59b6;
}

.mobile-search-badge[data-type="ova"] {
    background: #ff9500;
}

.mobile-search-badge[data-type="serie"] {
    background: #0053cc;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 110vh;
    background: rgba(10, 10, 15, 0.98);
    color: white;
    transition: none;
    z-index: 200;
    padding: 1rem;
    overflow-y: auto;
}

@media (min-width: 769px) {
    .sidebar:not(.active) {
        display: none;
    }
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.7rem;
    padding-top: 1rem;
}

#closeSidebar {
    display: none;
}

.sidebar-content {
    padding: 0;
}

.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group h4 {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.setting-group h4 i {
    margin-right: 0.5rem;
    color: #17a2b8;
}

.settings-list a i {
    margin-right: 0.8rem;
    width: 16px;
    text-align: center;
    color: #17a2b8;
}

.settings-list {
    list-style: none;
    margin-bottom: 1rem;
}

.settings-list li {
    margin-bottom: 0.5rem;
}

.settings-list a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 0.8rem;
    border-radius: 10px;
    transition: background 0.2s;
}

.settings-list a:hover {
    background: rgba(23, 162, 184, 0.2);
}

.settings-list a.active {
    background: rgba(23, 162, 184, 0.2);
    color: white;
    font-weight: 600;
}

.settings-list a.active i {
    color: #17a2b8;
}

.settings-list--genres a i {
    color: #17a2b8;
}

.settings-list--genres a.active i {
    color: #17a2b8;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
}

.setting-item label {
    color: white;
    font-size: 0.9rem;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.setting-item select {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.3rem 0.5rem;
    border-radius: 5px;
    font-size: 0.8rem;
}

.stats {
    padding: 0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.8rem;
    color: white;
    font-size: 0.9rem;
}

.stat-item span:last-child {
    color: #4caf50;
    font-weight: bold;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    display: none;
}

.overlay.active {
    display: block;
}

main {
    margin-top: 70px;
    padding: 1rem;
    flex: 1;
    background: #000000;
    min-height: calc(100vh - 70px);
    max-width: 100vw;
    overflow-x: hidden;
}

.carousel-section {
    margin-bottom: 2rem;
    margin-top: 0;
}

.carousel-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: white;
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    overflow: hidden;
    height: 400px;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.carousel-item {
    min-width: 100%;
    position: relative;
    cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
    .carousel-item {
        transition: transform 0.3s;
    }
}

.carousel-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.carousel-bg {
    height: 400px;
}

@media (max-width: 768px) {
    .carousel-container {
        height: 320px;
    }

    .carousel-item img,
    .carousel-bg {
        height: 320px !important;
    }

    .carousel {
        scroll-snap-type: x mandatory;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .carousel::-webkit-scrollbar {
        display: none;
    }
}

.carousel-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.3) 30%,
        rgba(0, 0, 0, 0.7) 60%,
        rgba(0, 0, 0, 1) 100%
    );
    padding: 2rem 2rem 2rem 2rem;
    color: white;
    height: 80%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
}

.carousel-btn {
    position: absolute;
    top: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    cursor: pointer;
    border-radius: 20%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    font-family: monospace;
    line-height: 1;
    padding: 0;
}

.carousel-btn.prev {
    right: 50px;
}

.carousel-btn.next {
    right: 1rem;
}

.movies-section {
    max-width: 1200px;
    margin: 0 auto;
}

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

.title-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* En desktop/tablet, título + filtros + view-toggle en una fila */
@media (min-width: 601px) {
    .section-header {
        flex-wrap: nowrap;
    }
    .title-container {
        display: contents;
    }
    #sectionTitle {
        order: 1;
    }
    .section-toolbar {
        order: 2;
        margin-left: auto;
        flex: 1;
        min-width: 0;
        justify-content: flex-end;
    }
    .controls {
        order: 3;
    }
}

.section-header h2 {
    color: white;
    margin-bottom: 0rem;
}

.section-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-header h2::before {
    content: "\f135";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 0.5rem;
    color: #17a2b8;
}

/* Iconos específicos para diferentes secciones */
.section-header h2[data-section="trending"]::before {
    content: "\f06d";
    /* fas fa-fire icon */
}

.section-header h2[data-section="newest"]::before {
    content: "\f055";
    /* plus-circle icon */
}

.section-header h2[data-section="ongoing"]::before {
    content: "\f144";
    /* play-circle icon */
}

.section-header h2[data-section="completed"]::before {
    content: "\f058";
    /* check-circle icon */
}

.section-header h2[data-section="favorites"]::before {
    content: "\f004";
    /* heart icon */
}

.section-header h2[data-section="watchLater"]::before {
    content: "\f02e";
    /* bookmark icon */
}

.section-header h2[data-section="accion"]::before {
    content: "\f6de";
    /* fa-fist-raised */
}

.section-header h2[data-section="aventuras"]::before {
    content: "\f6fc";
    /* mountain icon */
}

.section-header h2[data-section="comedia"]::before {
    content: "\f599";
    /* laugh icon */
}

.section-header h2[data-section="drama"]::before {
    content: "\f630";
    /* theater-masks icon */
}

.section-header h2[data-section="romance"]::before {
    content: "\f004";
    /* heart icon */
}

.section-header h2[data-section="random"]::before {
    content: "\f074";
    /* random icon */
}

.controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}

.advanced-filters {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
    flex-wrap: nowrap;
}

.advanced-filters select {
    width: 110px;
    padding: 0.62rem 1.75rem 0.62rem 0.75rem;
    border: 2px solid #333;
    border-radius: 20px;
    background: transparent;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="white" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.55rem center;
    background-size: 0.8rem;
    padding-right: 1.6rem;
}
.advanced-filters select:hover {
    background-color: rgba(23, 162, 184, 0.1);
    color: #17a2b8 !important;
    border-color: #17a2b8 !important;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%2317a2b8" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
}

.advanced-filters select option {
    background: #000000;
    color: white;
    padding: 0.5rem;
}

.view-toggle {
    display: flex;
    gap: 0.3rem;
}

.view-toggle button {
    background: transparent;
    border: none;
    color: white;
    padding: 0.53rem;
    border: 2px solid #333;
    border-radius: 18px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.view-toggle button:hover {
    background: transparent;
    border-color: #17a2b8;
    color: #17a2b8;
}

.view-toggle button.active {
    background: transparent;
    border-color: #17a2b8;
    color: #17a2b8;
}

.filter-tabs {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-tab {
    background: transparent;
    border: 2px solid #333;
    color: white;
    padding: 0.62rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition:
        background 0.2s,
        border-color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.filter-tab:hover {
    background: transparent;
    color: #17a2b8 !important;
    border-color: #17a2b8 !important;
}

.filter-tab.active {
    background: transparent;
    color: #00bcd4 !important;
    border-color: #00bcd4 !important;
}

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

.movie-grid.list-view {
    grid-template-columns: 1fr;
}

.movie-grid.list-view .movie-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 10px;
    position: relative;
}

.movie-grid.list-view .movie-poster {
    width: 100px;
    height: 150px;
    margin-right: 1rem;
    flex-shrink: 0;
}

.movie-grid.list-view .movie-poster::after {
    display: none;
}

.movie-grid.list-view .movie-title {
    position: static;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-shadow: none;
}

.movie-grid.list-view .movie-year {
    position: static;
    font-size: 0.9rem;
    color: #ccc;
    text-shadow: none;
}

.movie-grid.list-view .movie-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.movie-grid.list-view .movie-actions {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.movie-grid.list-view .badges-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    flex-direction: column;
}

.movie-grid.list-view .movie-rating {
    position: static;
    background: rgba(0, 0, 0, 0.8);
    color: #ffd700;
    padding: 0.14rem 0.4rem;
    border-radius: 15px;
    font-size: 0.8rem;
    order: 1;
}

.movie-grid.list-view .type-badge {
    position: absolute;
    left: 122px;
    top: 0.5rem;
    padding: 0.296rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 2;
}

.movie-grid.list-view .status-indicator {
    position: static;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    order: 3;
}

.movie-card {
    position: relative;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    .movie-card {
        transition:
            transform 0.2s ease,
            box-shadow 0.2s ease;
    }

    .movie-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
}

.movie-poster {
    width: 100%;
    height: 370px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background-color: #1a1a1a;
}

.movie-poster::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0.85) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.skeleton-bg {
    animation: pulse-bg 1s infinite ease-in-out;
}

@keyframes pulse-bg {
    0% {
        background-color: #1a1a1a;
    }
    50% {
        background-color: #242424;
    }
    100% {
        background-color: #1a1a1a;
    }
}

.movie-poster.loaded {
    animation: none;
    background-color: transparent;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.15s ease-out;
}

.movie-poster.loaded img {
    opacity: 1;
}

.movie-title {
    position: absolute;
    bottom: 28px;
    left: 10px;
    right: 10px;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    margin: 0;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    font-weight: bold;
    line-height: 1.2;
    z-index: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-year {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    color: #ddd;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
    z-index: 2;
}

.favorite-btn {
    position: absolute;
    top: 37px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: #ccc;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8rem;
    cursor: pointer;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
}

.favorite-btn.active {
    color: #e74c3c;
}

.movie-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffd700;
    padding: 0.14rem 0.4rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.view-count {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.quality-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 2;
}

.type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(23, 162, 184, 0.9);
    color: white;
    padding: 0.296rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.type-badge[data-type="movie"],
.movie-grid.list-view .type-badge[data-type="movie"] {
    background: rgba(155, 89, 182, 0.9);
}

.type-badge[data-type="ova"],
.movie-grid.list-view .type-badge[data-type="ova"] {
    background: rgba(255, 149, 0, 0.9);
}

.type-badge[data-type="serie"],
.movie-grid.list-view .type-badge[data-type="serie"] {
    background: #0053cc;
}

.status-indicator {
    position: absolute;
    top: 40px;
    right: 10px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.status-indicator.ongoing {
    background: #4caf50;
}

.status-indicator.completed {
    background: #e74c3c;
}

.movie-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #ff6b6b;
    border-radius: 2px;
}

.movie-card .movie-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.3);
}

.movie-card .progress-bar {
    background: #4caf50;
}

.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.8);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.6);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 900px;
    background: rgba(30, 60, 114, 0.95);
    border-radius: 15px;
    text-align: center;
}

.modal-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #ccc;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: white;
}

.close:hover {
    color: #ff6b6b;
}

#videoContainer {
    margin: 0rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#videoContainer iframe {
    width: 100%;
    max-width: 890px;
    max-height: 800px;
    border-radius: 10px;
}

#modalDescription {
    margin-top: 1rem;
    line-height: 1.6;
    color: #ddd;
    text-align: left;
    max-height: calc(1.6em * 4);
    overflow-y: auto;
}

.rating-section {
    margin: 1.5rem 0;
    text-align: center;
}

.star-rating {
    font-size: 2rem;
    margin-top: 0.5rem;
}

.star {
    color: #666;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    padding: 0.2rem;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.star:hover,
.star.active {
    color: #ffd700;
}

.movie-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    /* margin-top: 2rem; */
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition:
        background 0.2s,
        transform 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.action-btn#favoriteBtn.active {
    background: transparent;
    color: #e74c3c !important;
    border-color: #e74c3c !important;
}

.action-btn#watchLaterBtn.active {
    background: transparent;
    color: #ffd700 !important;
    border-color: #ffd700 !important;
}

.movie-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #ccc;
    margin-bottom: 0.3rem;
}

/* --- ESTILOS FOOTER --- */
footer {
    background: rgba(0, 0, 0, 0.95);
    padding: 1.5rem 1rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 2rem;
}

.footer-social a {
    color: #ccc;
    text-decoration: none;
    font-size: 1.8rem;
    /* Tamaño de los iconos */
    transition:
        color 0.3s,
        transform 0.3s;
}

.footer-social a:hover {
    color: #17a2b8 !important;
}

.footer-bottom {
    color: #ccc;
    font-size: 0.9rem;
}

.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    z-index: 1001;
    transform: translateX(400px);
    transition: transform 0.2s;
}

.notification.show {
    transform: translateX(0);
}

/* Tablets */
@media (max-width: 1024px) {
    main {
        margin-top: 70px;
        padding: 20px;
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.5rem;
    }
}

/* Mobile Large */
@media (max-width: 1024px) {
    .sidebar {
        height: 100vh;
    }
    .filter-tabs {
        display: none;
    }

    #mobileFilterSelect {
        display: block !important;
        padding: 0.53rem 2rem 0.53rem 1rem;
        border: 1px solid #333;
        border-radius: 20px;
        background: transparent;
        color: white;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        transition: background-color 0.2s;
        max-width: 200px;
        min-width: 100px;
        outline: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="white" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
        background-repeat: no-repeat;
        background-position: right 0.8rem center;
        background-size: 0.8rem;
    }

    #mobileFilterSelect:hover {
        background-color: transparent;
        color: #17a2b8 !important;
        border-color: #17a2b8 !important;
        background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%2317a2b8" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    }

    #mobileFilterSelect option {
        background: #000000;
        color: white;
    }

    .controls {
        justify-content: space-between;
        background: transparent;
        padding: 0;
        border: none;
    }
}

/* Tablet/Mobile Landscape - Fix overlapping filters at ~774px width */
@media (max-width: 850px) {
    .sidebar {
        height: 100vh;
    }
    .section-header h2 {
        font-size: 1.4rem;
        white-space: nowrap;
    }

    .advanced-filters {
        gap: 0.3rem;
        justify-content: center;
    }

    .advanced-filters select {
        width: 100px;
        font-size: 0.8rem;
        padding: 0.53rem 1.5rem 0.53rem 0.8rem;
        padding-right: 1.6rem;
    }

    #mobileFilterSelect {
        max-width: 100px;
        min-width: 80px;
        font-size: 0.8rem;
        border: 2px solid #333;
    }
    .view-toggle button {
        min-width: 35px;
        min-height: 35px;
        font-size: 1rem;
        padding: 0.53rem;
    }
    .filters-row {
        margin-bottom: 0.5rem;
    }
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .controls {
        gap: 0.4rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        height: 100vh;
    }
    .section-header h2 {
        font-size: 1.2rem;
        white-space: nowrap;
    }

    .section-header h2::before {
        font-size: 1.1rem;
    }

    header {
        padding: 1rem 1rem 0.5rem 1rem;
    }

    .mobile-search-header {
        padding: 1rem 1rem 0.5rem 1rem;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
        margin: 0;
        margin-left: 0.5rem;
    }

    #searchInput {
        display: none;
    }

    .desktop-search-btn {
        display: none;
    }

    .search-toggle {
        display: flex;
    }

    .navbar-actions {
        gap: 0.7rem;
    }

    main {
        margin-top: 52px;
        padding: 1rem 1rem 1rem 1rem;
    }

    .sidebar {
        width: 280px;
        left: -280px;
    }

    .sidebar-header {
        padding-top: 1rem;
    }

    .carousel-section {
        margin-bottom: 0.5rem;
    }

    .carousel-section h2 {
        font-size: 1.5rem;
    }

    .carousel-item img {
        height: 160px;
    }

    .carousel-info {
        bottom: -2px;
    }

    .movie-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }

    .movie-poster {
        height: 240px;
    }

    .section-header {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .title-container {
        display: contents;
    }

    #sectionTitle {
        order: 1;
        font-size: 1.1rem;
        white-space: nowrap;
        margin: 0;
        flex-shrink: 0;
    }

    .section-toolbar {
        order: 2;
        margin-left: auto;
        flex: 1;
        min-width: 0;
        width: auto;
        justify-content: flex-end;
    }

    .controls {
        order: 3;
        flex-direction: row;
        justify-content: flex-end;
        width: auto;
        gap: 0.3rem;
        background: transparent;
        padding: 0;
        border: none;
        flex-shrink: 0;
    }

    #mobileFilterSelect {
        background: transparent;
        border: 2px solid #333;
        color: white;
        padding: 0.53rem 1rem;
        border-radius: 20px;
        cursor: pointer;
        font-size: 0.8rem;
        outline: none;
        max-width: 90px;
        min-width: 50px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="white" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
        background-repeat: no-repeat;
        background-position: right 0.8rem center;
        background-size: 0.8rem;
    }

    #mobileFilterSelect:hover {
        background-color: transparent;
        color: #17a2b8 !important;
        border-color: #17a2b8 !important;
        background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%2317a2b8" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    }

    #mobileFilterSelect option {
        background: #000000;
        color: white;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1.5rem;
    }

    .modal-info {
        flex-wrap: wrap;
        gap: 1rem;
        font-size: 0.8rem;
    }

    #videoContainer iframe {
        height: 200px;
        width: 100%;
    }

    .movie-actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    .action-btn {
        width: 100%;
        padding: 1rem;
    }

    .carousel-info {
        padding: 1rem;
    }

    .carousel-info h3 {
        font-size: 1.2rem;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .carousel-info p {
        font-size: 0.8rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .carousel-btn {
        font-size: 1.3rem;
        width: 35px;
        height: 35px;
        min-width: 35px;
        min-height: 35px;
    }

    .carousel-btn.prev {
        right: 45px;
    }

    .carousel-btn.next {
        right: 0.5rem;
    }

    .star-rating {
        font-size: 1.5rem;
    }

    .advanced-filters {
        gap: 0.2rem;
        flex-wrap: nowrap;
        width: auto;
        justify-content: flex-end;
        flex: 1;
        min-width: 0;
    }

    .advanced-filters select {
        width: auto;
        min-width: 0;
        flex: 1;
        max-width: 95px;
        font-size: 0.75rem;
        padding: 0.53rem 1.2rem 0.53rem 0.45rem;
        background-position: right 0.3rem center;
        background-size: 0.6rem;
        padding-right: 1.1rem;
    }

    #genreFilter {
        max-width: 105px;
    }

    .filter-tabs {
        gap: 0.3rem;
    }

    .filter-tab {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .movie-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-icon {
        font-size: 3rem;
    }
}
@media (max-width: 738px) {
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/* Móvil: título arriba, filtros abajo en fila propia */
@media (max-width: 600px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
        flex-wrap: wrap;
    }

    .title-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 0.5rem;
    }

    #sectionTitle {
        order: unset;
    }

    .section-toolbar {
        order: unset;
        margin-left: 0;
        width: 100%;
        flex: none;
        justify-content: center;
    }

    .controls {
        order: unset;
    }

    .advanced-filters {
        width: 100%;
        justify-content: space-between;
    }

    .advanced-filters select {
        width: 23%;
        max-width: none;
        flex: 1;
        font-size: 0.8rem;
    }

    #genreFilter {
        max-width: none;
    }
}

/* Mobile Medium */
@media (max-width: 480px) {
    header {
        padding: 0.6rem;
    }

    .mobile-search-header {
        padding: 0.53rem;
    }

    .header-content {
        gap: 0.5rem;
    }

    header h1 {
        font-size: 1.5rem;
        margin: 0 0.2rem;
    }

    .sidebar-toggle,
    .search-toggle {
        font-size: 1.3rem;
        padding: 0.4rem;
    }

    .sidebar {
        width: 60vw;
        left: -60vw;
    }
    .sidebar-header {
        padding-top: 0.3rem;
    }

    #closeSidebar {
        display: none;
    }

    main {
        margin-top: 50px;
        padding: 0.6rem;
    }

    .carousel-section {
        margin-bottom: 1.5rem;
    }

    .carousel-section h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .movie-poster {
        height: 240px;
    }

    .controls {
        flex-direction: row;
        gap: 0.3rem;
        align-items: center;
        justify-content: space-between;
        margin: 0;
        background: transparent;
        padding: 0;
        border: none;
    }

    .movie-grid.list-view .movie-actions {
        top: 0.6rem;
        right: 0.6rem;
    }

    .movie-grid.list-view .movie-card {
        padding: 0.5rem;
    }

    .movie-grid.list-view .type-badge {
        padding: 0.265rem 0.5rem;
        top: 0.6rem;
    }

    .view-toggle button {
        min-width: 35px;
        min-height: 35px;
        font-size: 1rem;
    }

    .favorite-btn {
        position: absolute;
        top: 33px;
        right: 10px;
    }
    .movie-rating {
        top: 10px;
        right: 10px;
    }
    .status-indicator {
        top: 40px;
        right: 10px;
        width: 11px;
        height: 11px;
    }

    .type-badge {
        padding: 0.265rem 0.5rem;
    }

    .modal-content {
        width: 98%;
        margin: 2% auto;
        padding: 1rem;
    }

    .modal-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    #videoContainer iframe {
        height: 180px;
    }

    .carousel-btn {
        font-size: 1.1rem;
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }

    .carousel-btn.prev {
        right: 40px;
    }

    .carousel-btn.next {
        right: 0.3rem;
    }

    .carousel {
        touch-action: pan-y;
    }

    .star-rating {
        font-size: 1.3rem;
    }

    .filters-row {
        flex-direction: row;
    }

    .filters-row #mobileFilterSelect {
        margin-right: auto;
    }

    .filters-row .controls {
        justify-content: flex-end;
    }
}

/* Mobile Small */
@media (max-width: 360px) {
    header {
        padding: 0.5rem;
    }

    .mobile-search-header {
        padding: 0.45rem;
    }

    header h1 {
        font-size: 1.3rem;
        margin: 0 0.3rem;
    }

    .sidebar-toggle,
    .search-toggle {
        font-size: 1.2rem;
        padding: 0.3rem;
    }
    .sidebar-header {
        padding-top: 0.1rem;
    }

    .mobile-search {
        padding: 0rem;
    }

    .mobile-search input {
        padding: 0.5rem 0.75rem 0.5rem 2.5rem;
        font-size: 0.9rem;
        height: 40px;
    }

    .mobile-search-icon {
        width: 16px;
        height: 16px;
        margin-left: 0.75rem;
    }

    main {
        padding: 0.5rem;
    }

    .movies-section {
        width: 100%;
        max-width: 100%;
    }

    .section-header {
        margin-bottom: 0.5rem;
    }

    .filters-row {
        width: 100%;
        flex-direction: row !important;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .filters-row .filter-tabs {
        flex-shrink: 0;
    }

    .filters-row .controls {
        width: 100% !important;
        flex: 1 !important;
        flex-direction: row !important;
        gap: 0.3rem;
        align-items: center;
        justify-content: space-between !important;
        background: transparent;
        padding: 0;
        border: none;
    }

    .filters-row .controls .view-toggle {
        flex-shrink: 0;
    }

    .view-toggle button {
        padding: 0.04rem;
    }

    #mobileFilterSelect {
        flex: 0 0 auto;
        min-width: 60px;
        max-width: 110px;
        font-size: 0.7rem;
        padding: 0.6rem 0.8rem;
    }

    .advanced-filters {
        gap: 0.2rem;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .advanced-filters select {
        min-width: 70px;
        font-size: 0.7rem;
        padding: 0.53rem 1.2rem 0.53rem 0.5rem;
        padding-right: 1.1rem;
    }

    .movie-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    .movie-poster {
        height: 220px;
    }

    .modal-content {
        padding: 0.8rem;
    }

    #videoContainer iframe {
        height: 160px;
    }

    .action-btn {
        font-size: 0.8rem;
        padding: 0.8rem;
    }

    .carousel-info {
        padding: 0.8rem;
    }

    .carousel-info h3 {
        font-size: 1rem;
    }

    .carousel-info p {
        font-size: 0.8rem;
    }
}

@media (max-width: 850px) {
    .filters-row {
        justify-content: flex-end !important;
    }

    .filters-row #mobileFilterSelect {
        margin-right: auto;
    }

    .filters-row .controls {
        justify-content: flex-end !important;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    .movie-card:hover {
        transform: none;
        box-shadow: none;
    }

    .movie-card:active {
        transform: none;
    }

    .action-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .action-btn:active {
        background: rgba(255, 255, 255, 0.3);
    }

    .star:hover {
        color: #666;
    }

    .star:active {
        color: #ffd700;
    }
}

.filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.filters-row .filter-tabs {
    margin-bottom: 0;
}

.filters-row .controls {
    margin-bottom: 0;
}

.filters-row .advanced-filters {
    margin-bottom: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.pagination button {
    background: transparent;
    border: 2px solid #333;
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
    min-width: 40px;
}

.pagination button:hover:not(:disabled):not(.active) {
    background: transparent;
    color: #17a2b8 !important;
    border-color: #17a2b8 !important;
}

.pagination button.active {
    color: #17a2b8 !important;
    border-color: #17a2b8 !important;
}

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

.pagination .dots {
    color: #333;
    padding: 0 0.5rem;
}

@media (max-width: 768px) {
    .filters-row {
        flex-direction: row;
        gap: 0.3rem;
        margin-bottom: 0.5rem;
    }

    .filters-row #mobileFilterSelect {
        margin-right: auto;
    }

    .filters-row .filter-tabs {
        width: 100%;
        justify-content: center;
    }

    .filters-row .controls {
        width: 100%;
        justify-content: flex-end;
    }

    .filters-row .advanced-filters {
        width: 100%;
    }

    .pagination {
        gap: 0.3rem;
    }

    .pagination button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-width: 40px;
    }
}

.recent-added-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
    cursor: pointer;
}

.recent-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.recent-thumb {
    width: 50px;
    height: 70px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}

.recent-info {
    flex: 1;
}

.recent-title {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-date {
    color: #999;
    font-size: 0.75rem;
}

@media (min-width: 769px) {
    .carousel-info h3 {
        font-size: 1.6rem !important;
    }
}

/* Estilos para tarjetas relacionadas */
.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.related-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: 0.3s;
}

.related-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    border-color: #17a2b8;
}