/* Estilos generales */
body {
    margin: 0;
    padding: 0;
    background: #181920;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: white;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 17px 40px;
    background: #23232b;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    margin-top: 20px;
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
    text-decoration: none;
}
.catalogo-titulo-principal{
    color: #00aaff;
    text-shadow: 1px 1px 3px #000000;
    margin-bottom: 40px;

}
.catalogo-text {
    display: none;
}

.panel-filtros-movil, .btn-filtrar-movil {
    display: none;
}


.logo-btn {
  padding: 10px 30px;
  font-size: 18px;
  border: none;
  background: none;
  color: #fff;
  font-weight: bold;
  font-style: italic;
  border: 2px solid #00aaff;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, border 0.2s;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-btn:hover {
    color: #00aaff;
    border-color: #00aaff;
    box-shadow: 0 0 10px #00aaff;
    
}

.logo-img-btn {
    height: 32px;
    width: 32px;
    object-fit: contain;
    filter: brightness(0.8);
    
}

.logo-titulo {
    text-decoration: underline;

}

.search-container {
    position: relative;
}

.search-bar {
    padding: 8px 15px;
    border: 2px solid #00aaff;
    border-radius: 20px;
    width: 250px;
    font-size: 14px;
    background: #23232b;
    color: #fff;
    transition: all 0.3s ease;
}

.search-bar:focus {
    outline: none;
    border-color: #00aaff;
    box-shadow: 0 0 10px #00aaff;
}

.search-results {
    position: absolute;
    top: 100%;
    right: 0;
    background: #23232b;
    border: 2px solid #00aaff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,170,255,0.3);
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    margin-top: 5px;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #00aaff33;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #fff;
}

.search-result-item:hover {
    background-color: #00aaff22;
}

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

/* Contenedor principal */
.catalogo-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Filtros */
.filtros-container {
    background: #23232b;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border: 2px solid #00aaff;
}

.filtros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.filtro-grupo {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filtro-grupo label {
    color: #00aaff;
    font-weight: 600;
}

.filtro-grupo select {
    padding: 0.5rem;
    border-radius: 5px;
    border: 1px solid #00aaff;
    background: #181920;
    color: white;
    cursor: pointer;
}

.filtro-grupo select:focus {
    outline: none;
    border-color: #00aaff;
    box-shadow: 0 0 5px #00aaff;
}

/* Grid de animes */
.catalogo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.catalogo-grid.visible {
    opacity: 1;
    transform: translateY(0);
}

.anime-card {
    position: relative;
    height: 350px;
    border-radius: 10px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid #00aaff;
}

.anime-card:hover {
    transform: scale(1.05);
}

.info-anime {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
}

.info-anime h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: #00aaff;
    text-shadow: 1px 1px 3px #000000;

}

.info-anime p {
    margin: 0.2rem 0;
    font-size: 0.9rem;
}

/* Paginación */
.paginacion {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.paginacion button {
    padding: 0.5rem 1rem;
    border: 2px solid #00aaff;
    background: transparent;
    color: #00aaff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.paginacion button:hover {
    background: #00aaff;
    color: white;
}

.paginacion button.activo {
    background: #00aaff;
    color: rgb(56, 56, 56);
}

/* Responsive */
@media (max-width: 768px) {
    .catalogo-container {
        padding: 1rem;
    }

    .filtros-grid {
        grid-template-columns: 1fr;
    }

    .search-bar {
        width: 200px;
    }
}

.barra-filtros {
    display: flex;
    align-items: center;
    gap: 16px;
    background: transparent;
    padding: 20px 0 20px 0;
    flex-wrap: wrap;
}

.filtro-desplegable {
    position: relative;
    display: inline-block;
}

.btn-desplegable {
    background: #23232b;
    color: #00aaff;
    border: 2px solid #00aaff;
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-desplegable:hover, .btn-desplegable:focus {
    background: #181920;
    color: #fff;
}

.filtros-desplegados {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    z-index: 10;
    min-width: 220px;
    background: #23232b;
    border: 2px solid #00aaff;
    border-radius: 10px;
    box-shadow: 0 4px 16px #00aaff22;
    padding: 18px 20px 10px 20px;
    margin-top: 4px;
}

.filtros-desplegados.abierto {
    display: block;
    animation: fadeIn 0.2s;
}

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

/* Grid de géneros tipo lista compacta y multicolumna, sin scroll interno */
.desplegado-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px 24px;
}

.desplegado-grid label {
  background: none;
  color: #e0e0e0;
  border: none;
  border-radius: 0;
  padding: 2px 0;
  font-size: 1.04rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 0;
  margin-right: 0;
  transition: color 0.18s;
  box-shadow: none;
  user-select: none;
}
.desplegado-grid label:hover, .desplegado-grid label:focus-within {
  color: #00aaff;
}
.desplegado-grid input[type="checkbox"] {
  accent-color: #00aaff;
  margin-right: 7px;
  width: 18px;
  height: 18px;
}

.filtro {
    display: flex;
    align-items: center;
    background: #23232b;
    border-radius: 6px;
    padding: 4px 12px;
    box-shadow: 0 2px 6px #00aaff22;
    font-size: 1em;
}

.filtro label {
    color: #bdbdbd;
    font-weight: 500;
    margin-right: 4px;
}

.filtro select {
    border: none;
    background: transparent;
    color: #00aaff;
    font-weight: 600;
    font-size: 1em;
    outline: none;
    margin-left: 2px;
    cursor: pointer;
}

.btn-filtrar {
    background: #00aaff;
    color: #fff;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    margin-left: 8px;
    cursor: pointer;
    font-size: 1em;
    box-shadow: 0 2px 6px #00aaff44;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.btn-filtrar:hover {
    background: #008fcc;
}
.filtro select:focus {
    outline: none;
    background: #494949;
    color: #00aaff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
}

.directorio-label {
    color: #00aaff;
    font-size: 25px;
    font-weight: 700;
    padding: 0 10px;
    margin-right: 2px;
    letter-spacing: 0.5px;
    background: none;
    border-radius: 0;
    text-decoration: none !important;
    transition: color 0.2s;
    display: inline-block;
}

.directorio-label:hover,
.directorio-label:focus {
    color: #7a7a7a;
    text-decoration: none !important;
}

.filtros-generos {
    margin-bottom: 20px;
    background: #23232b;
    padding: 18px 20px 10px 20px;
    border-radius: 10px;
    border: 2px solid #00aaff;
}

.filtros-generos > label {
    color: #00aaff;
    font-weight: 600;
    font-size: 1.1em;
    display: block;
    margin-bottom: 10px;
}

.generos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 24px;
}

.generos-grid label {
    color: #fff;
    font-size: 1em;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 2px 0;
}

.generos-grid input[type="checkbox"] {
    accent-color: #00aaff;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    border-radius: 4px;
    border: 2px solid #00aaff;
    background: #181920;
    cursor: pointer;
}

.loader {
    border: 6px solid #23232b;
    border-top: 6px solid #00aaff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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

.label-anio {
    color: #bdbdbd;
    font-weight: 600;
    font-size: 1.1em;
    display: block;
    margin-bottom: 10px;
}

#anio-slider-value {
    color: #00aaff;
    font-weight: bold;
}

/* Contenedor del slider */
.slider-container {
    position: relative;
    width: 220px;
    height: 36px;
    margin: 18px 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Track de fondo */
.slider-track {
    position: absolute;
    height: 6px;
    width: 100%;
    background: #23232b;
    border-radius: 4px;
    z-index: 1;
}

/* Slider doble */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: transparent;
    outline: none;
    position: absolute;
    pointer-events: all;
    margin: 0;
    z-index: 2;
}

/* Thumb para Chrome/Safari */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #00aaff;
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 0 4px #00aaff88;
    margin-top: -8px;
}

/* Thumb para Firefox */
.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #00aaff;
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 0 4px #00aaff88;
}

/* Thumb para IE/Edge */
.slider::-ms-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #00aaff;
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 0 4px #00aaff88;
}

/* Track para todos los navegadores */
.slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 4px;
    background: transparent;
}
.slider::-ms-fill-lower,
.slider::-ms-fill-upper {
    background: transparent;
}

/* Valores del slider */
.slider-values {
    width: 100%;
    display: flex;
    justify-content: space-between;
    color: #00aaff;
    font-weight: bold;
    font-size: 1em;
    margin-top: 4px;
}

input[type="range"]::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #00aaff;
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 0 4px #00aaff88;
    margin-top: -8px;
}
input[type="range"]:focus::-webkit-slider-thumb {
    outline: 2px solid #fff;
}
input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #00aaff;
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 0 4px #00aaff88;
}
input[type="range"]:focus::-moz-range-thumb {
    outline: 2px solid #fff;
}
input[type="range"]::-ms-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #00aaff;
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 0 4px #00aaff88;
}

@media screen and (max-width: 769px) {
    .header-right {
      display: none !important;
      
    }
  }

@media screen and (min-width: 769px) {
    .header-right {
        display: flex !important;
    }
}

/* Estilos para Autenticación */
.auth-container {
    display: flex;
    align-items: center;
    margin-left: -2px;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: linear-gradient(135deg, #00aaff, #0088cc);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 170, 255, 0.3);
    width: 40px;
    height: 40px;
}

.auth-btn .google-icon {
    width: 28px;
    height: 28px;
    margin-right: 0;
    filter: blur(100%);
    transition: filter 0.3s ease;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #0088cc, #006699);
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.4);
    transform: translateY(-1px);
}

.auth-btn:hover .google-icon {
    filter: none;
}

.user-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.user-info:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #00aaff;
    object-fit: cover;
}

.user-name {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu {
    display: none;
    position: absolute;
    top: 115%;
    right: 0;
    background: #2c2c34;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    min-width: 160px;
    overflow: hidden;
    border: 1px solid #00aaff88;
    animation: fadeInScale 0.2s ease-out;
}

.user-menu.show {
    display: block;
}

.user-menu-item {
    display: block;
    padding: 12px 16px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.user-menu-item:hover {
    background-color: #00aaff44;
    color: #fff;
}

.logout-btn {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    color: #e0e0e0;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.logout-btn:hover {
    background: #ff4444;
    color: white;
    transform: none;
}

/* Modal de Autenticación */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.auth-modal-content {
    background: #23232b;
    margin: 10% auto;
    padding: 20px 30px;
    border: 1px solid #00aaff;
    border-radius: 15px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 5px 25px rgba(0,170,255,0.2);
    position: relative;
    animation: slideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #00aaff33;
}

.auth-modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
}

.auth-modal-close {
    background: none;
    border: none;
    color: #00aaff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.auth-modal-close:hover {
    color: #fff;
}

.auth-modal-body {
    padding: 25px;
    text-align: center;
}

.auth-modal-body p {
    color: #ccc;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.5;
}

.auth-divider {
    position: relative;
    margin: 25px 0;
    text-align: center;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #00aaff33;
}

.auth-divider span {
    background: #23232b;
    padding: 0 15px;
    color: #00aaff;
    font-size: 14px;
    font-weight: 500;
}

.auth-guest-btn {
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    color: #00aaff;
    border: 2px solid #00aaff;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.auth-guest-btn:hover {
    background: #00aaff;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.3);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* Responsive para autenticación */
@media screen and (max-width: 768px) {
    .auth-container {
        margin-left: 10px;
    }
    
    .auth-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .user-name {
        max-width: 80px;
        font-size: 12px;
    }
    
    .auth-modal-content {
        margin: 10% auto;
        width: 66%;
        height: 58%;
    }
    
    .auth-modal-header {
        padding: 15px 20px;
    }
    
    .auth-modal-header h2 {
        font-size: 20px;
    }
    
    .auth-modal-body {
        padding: 20px;
    }
}

/* Perfil de usuario en el menú lateral */
.sidebar-auth-section {
    width: 85%;
    margin: 15px auto;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid transparent;
}

.sidebar-user-info:hover {
    background-color: #00aaff22;
}

.sidebar-user-info.open {
    border-color: #00aaff88;
    background-color: #00aaff11;
}

.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    border: 1px solid #00aaff;
}

#sidebar-user-name {
    flex-grow: 1;
    color: #00aaff;
    font-size: 1.05rem;
    font-weight: 600;
}

.sidebar-arrow {
    font-size: 0.8rem;
    color: #00aaff;
    transition: transform 0.3s;
}

.sidebar-user-info.open .sidebar-arrow {
    transform: rotate(180deg);
}

#sidebar-user-menu {
    display: none;
    flex-direction: column;
    padding-left: 20px;
    margin-top: 5px;
    border-left: 2px solid #00aaff44;
    margin-left: 30px;
    padding-top: 5px;
    padding-bottom: 5px;
}

#sidebar-user-menu.show {
    display: flex;
}

.sidebar-user-menu-item {
    color: #ccc;
    text-decoration: none;
    font-size: 1rem;
    padding: 10px 15px;
    border-radius: 6px;
    transition: color 0.2s, background-color 0.2s;
    background: none;
    border: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
}

.sidebar-user-menu-item:hover {
    color: #fff;
    background-color: #00aaff22;
}

.sidebar-directorio {
    display: block;
    margin: 0 auto 15px auto;
}

/* Estilos para Autenticación */
.auth-container {
    display: flex;
    align-items: center;
    margin-left: -2px;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: linear-gradient(135deg, #00aaff, #0088cc);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 170, 255, 0.3);
    width: 40px;
    height: 40px;
}

.auth-btn .google-icon {
    width: 28px;
    height: 28px;
    margin-right: 0;
    filter: blur(100%);
    transition: filter 0.3s ease;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #0088cc, #006699);
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.4);
    transform: translateY(-1px);
}

.auth-btn:hover .google-icon {
    filter: none;
}

.user-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.user-info:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #00aaff;
    object-fit: cover;
}

.user-name {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu {
    display: none;
    position: absolute;
    top: 115%;
    right: 0;
    background: #2c2c34;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    min-width: 160px;
    overflow: hidden;
    border: 1px solid #00aaff88;
    animation: fadeInScale 0.2s ease-out;
}

.user-menu.show {
    display: block;
}

.user-menu-item {
    display: block;
    padding: 12px 16px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.user-menu-item:hover {
    background-color: #00aaff44;
    color: #fff;
}

.logout-btn {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    color: #e0e0e0;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.logout-btn:hover {
    background: #ff4444;
    color: white;
    transform: none;
}

.watch-later-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 18px;
    cursor: pointer;
    transition: none;
    opacity: 1;
    transform: scale(1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    animation: none !important;
    transform: scale(1) !important;
}

.watch-later-btn.added {
    background-color: #4CAF50;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* Fondo degradado negro para info-anime en las tarjetas */
.anime-card {
  position: relative;
  overflow: hidden;
}

/* Fondo degradado negro igual al index para info-anime en las tarjetas */
.anime-card .info-anime {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 3rem 0.7rem 0.7rem 0.7rem;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 60%, transparent 100%);
    color: white;
    z-index: 2;
    border-radius: 0 0 10px 10px;
    width: 100%;
    box-sizing: border-box;
}

.anime-card .info-anime h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: #00aaff;
}

.anime-card .info-anime p {
    margin: 0.2rem 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Barra de filtro por letras */
.barra-letras-filtro {
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  gap: 4px;
  justify-items: center;
  align-items: center;
  margin: 12px 0 10px 0;
  padding: 3px 0;
}

.letra-filtro {
  width: 100%;
  min-width: 0;
  background: #181c22;
  color: #00aaff;
  border: 2px solid #00aaff;
  border-radius: 6px;
  padding: 4px 0;
  font-size: 1.08rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border 0.18s, box-shadow 0.18s;
  outline: none;
  box-shadow: 0 2px 8px #00aaff22;
  letter-spacing: 1px;
  white-space: nowrap;
  min-height: 28px;
  margin: 0;
  text-align: center;
}

.letra-filtro:hover, .letra-filtro.selected {
  background: #00aaff;
  color: #181c22;
  border-color: #00aaff;
  box-shadow: 0 4px 16px #00aaff33;
}

/* Mejorar botones de filtros principales */
.barra-filtros .filtro-header,
#btn-filtrar {
  background: #00eaff !important;
  color: #181c23 !important;
  border: 2px solid #00eaff !important;
  border-radius: 7px !important;
  font-size: 1rem !important;
  padding: 4px 14px !important;
  min-height: 32px !important;
  min-width: 0 !important;
  box-shadow: none !important;
  margin-right: 8px;
  transition: background 0.2s, color 0.2s;
}

.barra-filtros .filtro-header:hover,
#btn-filtrar:hover {
  background: #00b6c7 !important;
  color: #fff !important;
}

.barra-filtros .filtro-acordeon {
  display: inline-block;
  margin-bottom: 8px;
}

/* Mejorar botón FILTRAR */
#btn-filtrar {
  background: #00eaff;
  color: #181c22;
  border: 2px solid #00eaff;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.08rem;
  padding: 8px 22px;
  margin-left: 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px #00eaff22;
  transition: background 0.18s, color 0.18s, border 0.18s, box-shadow 0.18s;
}
#btn-filtrar:hover {
  background: #181c22;
  color: #00eaff;
  border-color: #00eaff;
  box-shadow: 0 4px 16px #00eaff33;
}



.panel-generos .desplegado-grid label,
.panel-anio .desplegado-grid label {
  background: none;
  color: #e0e0e0;
  border: none;
  border-radius: 0;
  padding: 2px 0;
  font-size: 1.04rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 0;
  margin-right: 0;
  transition: color 0.18s;
  box-shadow: none;
  user-select: none;
}
.panel-generos .desplegado-grid label:hover, .panel-generos .desplegado-grid label:focus-within,
.panel-anio .desplegado-grid label:hover, .panel-anio .desplegado-grid label:focus-within {
  color: #00aaff;
}
.panel-generos .desplegado-grid input[type="checkbox"],
.panel-anio .desplegado-grid input[type="checkbox"] {
  accent-color: #00aaff;
  margin-right: 7px;
  width: 18px;
  height: 18px;
}

.panel-generos .filtro-contenido,
.panel-anio .filtro-contenido {
  min-width: 800px !important;
  max-width: 1000px !important;
  min-height: 260px !important;
  padding: 36px 48px 32px 48px !important;
  font-size: 1.18rem !important;
  background: #181c22 !important;
  border: 2px solid #00aaff !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 32px #00aaff22 !important;
  z-index: 1002 !important;
}

@media (max-width: 900px) {
  .panel-generos .filtro-contenido,
  .panel-anio .filtro-contenido {
    min-width: 98vw !important;
    max-width: 98vw !important;
    padding: 18px 8px 18px 8px !important;
    font-size: 1.01rem !important;
  }
}

.barra-filtros .panel-generos .filtro-contenido,
.barra-filtros .panel-anio .filtro-contenido {
  position: absolute !important;
  left: 0 !important;
  right: auto !important;
  min-width: 900px !important;
  max-width: 1200px !important;
  min-height: 300px !important;
  padding: 40px 60px 40px 60px !important;
  font-size: 1.22rem !important;
  background: #181c22 !important;
  border: 2px solid #00aaff !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 32px #00aaff22 !important;
  z-index: 2000 !important;
}

@media (max-width: 900px) {
  .barra-filtros .panel-generos .filtro-contenido,
  .barra-filtros .panel-anio .filtro-contenido {
    min-width: 98vw !important;
    max-width: 98vw !important;
    left: 0 !important;
    right: 0 !important;
    padding: 18px 8px 18px 8px !important;
    font-size: 1.01rem !important;
  }
}

.panel-generos-grande,
.panel-anio-grande {
  min-width: 900px !important;
  max-width: 1200px !important;
  min-height: 300px !important;
  padding: 40px 60px 40px 60px !important;
  font-size: 1.22rem !important;
  background: #181c22 !important;
  border: 2px solid #00aaff !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 32px #00aaff22 !important;
  z-index: 2000 !important;
  position: absolute !important;
  left: 0 !important;
  right: auto !important;
}

@media (max-width: 900px) {
  .panel-generos-grande,
  .panel-anio-grande {
    min-width: 98vw !important;
    max-width: 98vw !important;
    left: 0 !important;
    right: 0 !important;
    padding: 18px 8px 18px 8px !important;
    font-size: 1.01rem !important;
  }
}

/* Paneles de filtros solo se abren con .activo, no con hover */
.filtro-contenido {
  display: none;
}
.filtro-acordeon.activo .filtro-contenido {
  display: block;
}

.panel-generos-grande:not(.panel-anio-grande):not(.panel-generos-grande) .desplegado-grid,
.panel-generos-grande.panel-tipo .desplegado-grid,
.panel-generos-grande.panel-estado .desplegado-grid,
.panel-generos-grande.panel-orden .desplegado-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px 0 !important;
  grid-template-columns: none !important;
}

.panel-generos-grande {
  min-width: 420px !important;
  max-width: 600px !important;
  min-height: 120px !important;
  padding: 18px 18px 18px 18px !important;
  font-size: 1.01rem !important;
  border-radius: 10px !important;
}
.panel-generos-grande .desplegado-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 10px;
  margin-top: 0;
  padding-right: 0;
}
.panel-generos-grande label {
  font-size: 0.98rem;
  padding: 1px 0;
  gap: 5px;
}
.panel-generos-grande input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin-right: 5px;
}

.panel-anio-grande {
  min-width: 420px !important;
  max-width: 600px !important;
  min-height: 120px !important;
  padding: 18px 18px 18px 18px !important;
  font-size: 1.01rem !important;
  border-radius: 10px !important;
}
.panel-anio-grande .desplegado-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 6px 10px;
  margin-top: 0;
  padding-right: 0;
}
.panel-anio-grande label {
  font-size: 0.98rem;
  padding: 1px 0;
  gap: 5px;
}
.panel-anio-grande input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin-right: 5px;
}

/* Nuevo: para paneles de tipo, estado y ordenar, en una sola fila */
.panel-filtros-fila .desplegado-grid {
  display: flex !important;
  flex-direction: row !important;
  gap: 0 32px !important;
  grid-template-columns: none !important;
  width: 100% !important;
  flex-wrap: wrap;
}

.panel-filtros-fila .desplegado-grid label {
  width: auto !important;
  margin: 0 0 0 0 !important;
  white-space: nowrap;
}

.panel-tipo.panel-filtros-fila .desplegado-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px 0 !important;
  grid-template-columns: none !important;
  width: 100% !important;
  align-items: flex-start;
}

.panel-tipo.panel-filtros-fila .desplegado-grid label {
  width: auto !important;
  margin: 0 0 0 0 !important;
}

.panel-anio-grande,
.panel-generos-grande {
  border: 2px solid #00eaff !important;
  border-radius: 8px !important;
  box-sizing: border-box;
}

.titulo-lista-animes {
  color: #00aaff;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 50px;
  margin-top: 0;
  text-align: left;
}

.barra-filtros .filtro-header,
#btn-filtrar {
  background: #181c22 !important;
  color: #00aaff !important;
  border: 2px solid #00eaff !important;
  border-radius: 7px !important;
  font-size: 1rem !important;
  padding: 4px 14px !important;
  min-height: 32px !important;
  min-width: 0 !important;
  box-shadow: none !important;
  margin-right: 8px;
  transition: background 0.2s, color 0.2s;
}

.barra-filtros .filtro-header:hover,
#btn-filtrar:hover {
  background: #00b6c7 !important;
  color: #fff !important;
}

@media (max-width: 600px) {
  .titulo-lista-animes {
    display: none;
    font-size: 1.3rem;
    margin-bottom: 20px;
  }
  .barra-filtros .filtro-header,
  #btn-filtrar {
    font-size: 0.95rem !important;
    padding: 3px 8px !important;
    min-height: 26px !important;
  }
}

@media (max-width: 1082px) {
  .barra-letras-filtro {
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    margin: 6px 0 6px 0;
    padding: 1px 0;
    height: auto;
  }
  .letra-filtro {
    font-size: 0.92rem;
    padding: 2px 0;
    min-height: 22px;
    border-radius: 5px;
  }
  .barra-letras-filtro::-webkit-scrollbar {
    height: 4px;
  }
  .barra-letras-filtro::-webkit-scrollbar-thumb {
    background: #00aaff;
    border-radius: 3px;
  }
  .barra-letras-filtro::-webkit-scrollbar-track {
    background: #181c22;
  }
}

@media screen and (max-width: 768px) {
  header {
    position: fixed !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 2000 !important;
    width: 90% !important;
    margin-top: 0 !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    max-width: 100vw !important;
  }
  body {
    padding-top: 64px !important;
  }
}
@media (max-width: 600px) {
    #toast-login {
      font-size: 1rem !important;
      padding: 5px 8px !important;
      border-radius: 6px !important;
      left: 200px !important;
      top: 90px !important;
      max-width: 70vw !important
    }
  }

/* Los estilos del menú móvil están en styless-catalogo-small.css */