/* ============================================
   circle/style.css - Estilos unificados
   (usa variables CSS para personalización)
   ============================================ */

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

/* ===== VARIABLES POR DEFECTO ===== */
:root {
    --mm-font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mm-primary: #6C63FF;
    --mm-primary-dark: #5a52d5;
    --mm-bg: #0a0a0a;
    --mm-card-bg: #1a1a1a;
    --mm-text: #e0e0e0;
    --mm-text-light: #888;
    --mm-text-white: #fff;
    --mm-border: #333;
    --mm-shadow: rgba(0,0,0,0.5);
    --mm-border-radius: 10px;
    --mm-transition: 0.2s;
}

/* ===== BASE ===== */
body {
    font-family: var(--mm-font-family);
    background: transparent;
    color: var(--mm-text);
    padding: 0;
    margin: 0;
    line-height: 1.5;
}

/* ===== HERO ===== */

.hero-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
    max-height: 700px;
    background: var(--mm-bg);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 40px;
    aspect-ratio: 16 / 9; /* Proporción 16:9 (más ancho que alto) */
}

/* Fondo con desenfoque más suave y menos oscuro */
.hero-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 30%;
    filter: blur(3px) brightness(0.5);
    transform: scale(1.05);
    transition: opacity 0.8s ease;
    z-index: 0;
}

/* Overlay más sutil para que se vea mejor el fondo */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(10,10,10,0.7) 0%, rgba(10,10,10,0.3) 60%, rgba(10,10,10,0.1) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 55%;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 0;
    transition: opacity 0.5s ease;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 30px rgba(0,0,0,0.9);
    margin-bottom: 4px;
    color: #fff;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    opacity: 0.95;
    color: #fff;
}

.hero-genre {
    background: rgba(108, 99, 255, 0.3);
    padding: 4px 16px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border: 1px solid rgba(108, 99, 255, 0.4);
    color: #fff;
}

.hero-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.hero-rating .stars { color: #f5c518; font-size: 1rem; letter-spacing: 1px; }
.hero-rating .score {
    background: rgba(0,0,0,0.5);
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
}
.hero-rating .votes {
    font-size: 0.8rem;
    opacity: 0.7;
}

.hero-overview {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 90%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 20px rgba(0,0,0,0.8);
    color: #fff;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    padding: 14px 36px;
    background: var(--mm-primary);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 25px rgba(108, 99, 255, 0.5);
    width: fit-content;
}
.hero-btn:hover {
    background: var(--mm-primary-dark);
    transform: scale(1.03);
    box-shadow: 0 6px 35px rgba(108, 99, 255, 0.7);
}
.hero-btn::after { content: '▶'; font-size: 0.8rem; margin-left: 4px; }

.hero-poster {
    position: absolute;
    right: 40px;
    bottom: 40px;
    z-index: 2;
    width: 200px;
    height: 300px;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.9);
    object-fit: cover;
    display: block;
    transition: opacity 0.5s ease, transform 0.3s ease;
    border: 2px solid rgba(255,255,255,0.1);
}
.hero-poster:hover {
    transform: scale(1.02);
}

.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 12px;
    background: rgba(0,0,0,0.4);
    padding: 8px 18px;
    border-radius: 30px;
    backdrop-filter: blur(8px);
}
.hero-dots span {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}
.hero-dots span.active {
    background: var(--mm-primary);
    transform: scale(1.4);
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.6);
}

/* Responsive Hero */
@media (max-width: 1024px) {
    .hero-wrapper { min-height: 400px; max-height: 600px; }
    .hero-title { font-size: 2.8rem; }
    .hero-poster { width: 160px; height: 240px; right: 30px; bottom: 30px; }
}

@media (max-width: 768px) {
    .hero-wrapper { padding: 30px; min-height: 350px; max-height: 500px; }
    .hero-content { max-width: 70%; }
    .hero-title { font-size: 2.2rem; }
    .hero-overview { font-size: 0.9rem; -webkit-line-clamp: 2; }
    .hero-poster { width: 130px; height: 195px; right: 20px; bottom: 20px; }
    .hero-dots { bottom: 12px; padding: 6px 14px; gap: 10px; }
    .hero-dots span { width: 8px; height: 8px; }
}

@media (max-width: 600px) {
    .hero-wrapper { padding: 20px; min-height: 280px; max-height: 400px; border-radius: 12px; }
    .hero-content { max-width: 100%; }
    .hero-title { font-size: 1.8rem; }
    .hero-overview { font-size: 0.8rem; -webkit-line-clamp: 2; }
    .hero-meta { font-size: 0.75rem; gap: 10px; }
    .hero-btn { padding: 10px 24px; font-size: 0.8rem; }
    .hero-poster { display: none; }
    .hero-dots { bottom: 10px; padding: 5px 12px; gap: 8px; }
    .hero-dots span { width: 6px; height: 6px; }
}

@media (max-width: 400px) {
    .hero-wrapper { min-height: 240px; max-height: 340px; padding: 15px; }
    .hero-title { font-size: 1.4rem; }
    .hero-overview { -webkit-line-clamp: 1; }
    .hero-btn { padding: 8px 18px; font-size: 0.7rem; }
}

/* ===== GRID ===== */
.grid-container {
    padding: 10px;
    height: 100%;
    overflow-y: auto;
}
.section-title {
    font-size: 1.3rem;
    color: var(--mm-text-white);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.card {
    background: var(--mm-card-bg);
    border-radius: var(--mm-border-radius);
    overflow: hidden;
    transition: transform var(--mm-transition);
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.05);
}
.card:hover { transform: scale(1.03); }
.card img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}
.card .info { padding: 10px; text-align: center; }
.card .title {
    font-size: 0.95rem;
    color: var(--mm-text-white);
    font-weight: 600;
}
.card .year {
    font-size: 0.8rem;
    color: var(--mm-text-light);
}
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}
.pagination a {
    background: var(--mm-card-bg);
    padding: 6px 14px;
    border-radius: 6px;
    color: var(--mm-text);
    text-decoration: none;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
}
.pagination a.active {
    background: var(--mm-primary);
    color: #fff;
}
.pagination a:hover { background: #555; }
.no-results {
    text-align: center;
    color: var(--mm-text-light);
    padding: 30px;
    font-weight: bold;
    text-transform: uppercase;
}
.loading-more {
    text-align: center;
    padding: 20px;
    color: var(--mm-text-light);
    display: none;
    text-transform: uppercase;
    font-weight: bold;
}

@media (max-width: 600px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .card img { height: 240px; }
}

/* ===== QUICKNAV ===== */
.quick-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}
.quick-nav a {
    flex: 1 1 auto;
    min-width: 80px;
    padding: 8px 12px;
    background: var(--mm-card-bg);
    border-radius: 20px;
    color: var(--mm-text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    transition: var(--mm-transition);
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid transparent;
}
.quick-nav a:hover {
    background: #333;
    color: #fff;
}
.quick-nav a.active {
    background: var(--mm-primary);
    color: #fff;
}
@media (max-width: 600px) {
    .quick-nav { flex-direction: column; gap: 6px; }
    .quick-nav a { flex: 1 1 100%; min-width: unset; white-space: normal; padding: 10px 12px; font-size: 0.9rem; border-radius: 8px; }
}
@media (max-width: 280px) {
    .quick-nav a { font-size: 0.75rem; padding: 8px 10px; }
}

/* ===== CATEGORÍAS (NAV) ===== */
.widget-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.widget-nav a {
    display: block;
    padding: 8px 12px;
    background: var(--mm-card-bg);
    border-radius: 6px;
    color: var(--mm-text);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--mm-transition);
    border-left: 3px solid transparent;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.widget-nav a:hover {
    background: #333;
    border-left-color: var(--mm-primary);
}
.widget-nav a.active {
    background: var(--mm-primary);
    color: #fff;
    border-left-color: var(--mm-primary-dark);
}

/* ===== BUSCADOR ===== */
.search-box {
    display: flex;
    gap: 8px;
}
.search-box input {
    flex: 1;
    padding: 6px 10px;
    background: var(--mm-card-bg);
    border: 1px solid var(--mm-border);
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
    font-family: inherit;
}
.search-box input:focus {
    outline: none;
    border-color: var(--mm-primary);
}
.search-box button {
    padding: 6px 14px;
    background: var(--mm-primary);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    font-family: inherit;
}
.search-box button:hover {
    background: var(--mm-primary-dark);
}

/* ===== FILTROS ===== */
.filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    background: var(--mm-card-bg);
    padding: 6px 12px;
    border-radius: 8px;
    overflow-x: auto;
    white-space: nowrap;
}
.filters label {
    color: var(--mm-text-light);
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    flex-shrink: 0;
}
.filters select {
    background: #222;
    border: 1px solid var(--mm-border);
    color: #fff;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    flex-shrink: 0;
    font-family: inherit;
}
.filters select:focus {
    outline: none;
    border-color: var(--mm-primary);
}
@media (max-width: 500px) {
    .filters { flex-wrap: wrap; gap: 4px; padding: 8px 10px; }
    .filters label { font-size: 0.65rem; }
    .filters select { font-size: 0.65rem; padding: 2px 4px; flex: 1; min-width: 60px; }
}

/* ===== REPRODUCTOR ===== */
.player-wrapper {
    position: relative;
    padding-top: 56.25%;
    width: 100%;
    height: 0;
    background: #000;
}
.player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ============================================
   ACORDEÓN DE CATEGORÍAS (para nav.php)
   ============================================ */
.accordion {
    background: transparent;
    border-radius: 10px;
    overflow: hidden;
}
.accordion-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #1a1a1a;
    border-radius: 8px;
    border-left: 3px solid #6C63FF;
    transition: background 0.2s;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}
.accordion-header:hover {
    background: #2a2a2a;
}
.accordion-header .arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}
.accordion-header.open .arrow {
    transform: rotate(180deg);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 0;
    background: transparent;
}
.accordion-content.open {
    max-height: 800px;
    padding: 8px 0 0 0;
}
.accordion-content .widget-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.accordion-content .widget-nav a {
    display: block;
    padding: 8px 12px 8px 20px;
    background: transparent;
    border-radius: 6px;
    color: #ccc;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.2s;
    border-left: 2px solid transparent;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.accordion-content .widget-nav a:hover {
    background: rgba(255,255,255,0.05);
    border-left-color: #6C63FF;
}
.accordion-content .widget-nav a.active {
    background: #6C63FF;
    color: #fff;
    border-left-color: #5a52d5;
}

/* ============================================
   SELECTORES ESTILO BOTÓN (Categorías y Filtros)
   ============================================ */

/* Contenedor común para ambos */
.nav-select-wrapper,
.filters-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: transparent;
    padding: 0;
    margin: 0;
    width: 100%;
}

/* Cada grupo de filtro (Año, Ordenar, Categorías) */
.filter-group,
.nav-select-wrapper {
    flex: 1 1 auto;
    min-width: 120px;
}

/* Estilo del select para que parezca un botón/acordeón */
.nav-select-wrapper select,
.filter-group select {
    width: 100%;
    padding: 8px 12px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 0.85rem;
    font-family: var(--mm-font-family, system-ui, sans-serif);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23aaa' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s, background 0.2s;
}

.nav-select-wrapper select:hover,
.filter-group select:hover {
    border-color: #6C63FF;
    background-color: #222;
}

.nav-select-wrapper select:focus,
.filter-group select:focus {
    outline: none;
    border-color: #6C63FF;
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.2);
}

/* Opciones dentro del select */
.nav-select-wrapper select option,
.filter-group select option {
    background: #1a1a1a;
    color: #e0e0e0;
    text-transform: none;
    font-weight: normal;
}

/* Placeholder (opción deshabilitada) */
.nav-select-wrapper select option[disabled],
.filter-group select option[disabled] {
    color: #888;
    font-weight: bold;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 600px) {
    .nav-select-wrapper,
    .filters-wrapper {
        flex-direction: column;
        gap: 6px;
    }
    .filter-group,
    .nav-select-wrapper {
        flex: 1 1 100%;
        min-width: unset;
    }
}

/* ============================================
   CARRUSEL AUTOMÁTICO INFINITO (sin scroll visible)
   ============================================ */
.carousel-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
    position: relative;
    background: transparent;
}
.carousel-track {
    display: flex;
    gap: 12px;
    width: max-content;
    will-change: transform;
    animation: scroll-carousel 24s linear infinite;
}
.carousel-item {
    flex: 0 0 auto;
    width: 80px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: transform 0.2s ease;
}
.carousel-item2 {
    flex: 0 0 auto;
    width: 160px;
    height: 240px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: transform 0.2s ease;
}
.carousel-item:hover {
    transform: scale(1.04);
}
.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@keyframes scroll-carousel {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
/* Pausar al pasar el mouse (opcional) */
.carousel-track:hover {
    animation-play-state: paused;
}
/* Responsive */
@media (max-width: 600px) {
    .carousel-item {
        width: 120px;
        height: 180px;
    }
    .carousel-track {
        gap: 8px;
        animation-duration: 16s;
    }
}