@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Montserrat:wght@700;800;900&display=swap');

:root {
    --primary-blue: #1E1B3A; 
    --primary-blue-hover: #110F24; 
    --accent-gold: #D4AF37; 
    --accent-gold-dark: #B5952F;
    --bg-light: #F8FAFC;
    --card-bg: #ffffff;
    --border-color: #E2E8F0;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --radius-lg: 16px;
    --radius-md: 8px;
    --danger: #E63946;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #000; /* <--- Vacío oscuro inicial */
    margin: 0;
    min-height: 100vh;
    display: block !important; 
}

h1, h2, h3, .ep-title { 
    font-family: 'Montserrat', sans-serif; 
}

/* --- BARRAS SUPERIORES --- */
.maintenance-bypass-bar {
    background: var(--accent-gold);
    color: var(--primary-blue);
    text-align: center;
    padding: 12px;
    font-weight: 700;
    font-size: 0.9rem;
}

.maintenance-bypass-bar a { 
    color: var(--primary-blue); 
    text-decoration: underline; 
    margin-left: 10px; 
}

.top-bar {
    background-color: var(--primary-blue);
    padding: 12px 20px; 
    width: 100%;
    box-sizing: border-box;
}

.top-bar-container {
    max-width: 1500px; 
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: flex-end; 
}

.lang-switcher a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    margin: 0 5px;
    padding: 6px 12px;
    border-radius: 20px;
    transition: 0.3s;
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
}

.lang-switcher a img {
    border-radius: 2px;
    display: block;
}

.lang-switcher a:hover { 
    color: #fff; 
    background: rgba(255,255,255,0.1); 
}

.lang-switcher a.active { 
    background: var(--accent-gold); 
    color: var(--primary-blue); 
}

/* --- CABECERA Y BANNER --- */
.site-header { 
    width: 100%; 
    margin: 0; 
    padding: 0; 
}

.banner {
    width: 100%; 
    height: auto;
    max-height: 400px;
    object-fit: contain;
    background-color: #000;
    display: block; 
    border-bottom: 4px solid var(--accent-gold);
}

/* --- ÚLTIMOS EPISODIOS --- */
.latest-section { 
    background-image: url("../images/bg.webp");
	background-repeat: repeat; 
    padding: 40px 20px; 
    border-bottom: 5px solid var(--accent-gold);
	transition: all 0.5s ease;
	position: relative; /* NUEVO */
    z-index: 20; /* NUEVO: Protege la sección de arriba */
}

.latest-container { 
    max-width: 1500px; 
    margin: 0 auto; 
}

.latest-title { 
    color: var(--primary-blue); 
    font-size: 1.2rem; 
    margin: 0 0 20px 0; 
    font-weight: 800; 
}

.latest-grid { 
    display: grid; 
    gap: 20px; 
}
.latest-grid-1 { grid-template-columns: 1fr; }
.latest-grid-2 { grid-template-columns: repeat(2, 1fr); }
.latest-grid-3 { grid-template-columns: repeat(3, 1fr); }
.latest-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) { 
    .latest-grid-2, .latest-grid-3, .latest-grid-4 { grid-template-columns: repeat(2, 1fr); } 
}
@media (max-width: 480px) { 
    .latest-grid-2, .latest-grid-3, .latest-grid-4 { grid-template-columns: 1fr; } 
}

.latest-card {
    position: relative; 
    height: 140px; 
    border-radius: var(--radius-lg); 
    overflow: hidden;
    cursor: pointer; 
    box-shadow: var(--shadow-soft); 
    transition: transform 0.3s, box-shadow 0.3s;
}

.latest-grid .latest-card.reveal.active:hover { 
    transform: scale(1.05) !important; 
    box-shadow: 0 0 25px var(--accent-gold) !important; 
    z-index: 2; 
}

.latest-card img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
}

.latest-overlay {
    position: absolute; 
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(30, 27, 58, 0.9) 0%, rgba(30, 27, 58, 0.4) 100%);
    display: flex; 
    flex-direction: column; 
    justify-content: flex-end; 
    padding: 20px;
}

.latest-ep-num { 
    font-size: 0.75rem; 
    font-weight: 700; 
    color: var(--accent-gold); 
    letter-spacing: 1px; 
}

.latest-ep-title { 
    margin: 5px 0 0; 
    font-size: 1.1rem; 
    font-weight: 700; 
    color: #fff; 
    line-height: 1.2; 
}

/* --- CONTENIDO PRINCIPAL --- */
.main-content { 
    max-width: 1500px; 
    margin: 0 auto; 
    padding: 0 20px; 
	position: relative; /* NUEVO */
    z-index: 20; /* NUEVO: Protege tus tarjetas de descarga */
}

.main-content h2 { 
    text-align: center; 
    color: var(--accent-gold); 
    margin: 60px 0 30px; 
    font-size: 2rem; 
    font-weight: 900; 
    letter-spacing: -0.5px;
}

/* Filtros de Saga */
.saga-filters { 
    display: flex; 
    justify-content: center; 
    flex-wrap: wrap; 
    gap: 10px; 
    margin-bottom: 50px; 
}

.saga-btn {
    background: #fff; 
    border: 2px solid var(--accent-gold); 
    color: var(--text-dark); 
    padding: 12px 28px; 
    border-radius: 30px; 
    font-family: 'Inter', sans-serif; 
    font-weight: 700; 
    font-size: 0.95rem; 
    cursor: pointer; 
    transition: all 0.5s ease; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.saga-btn:hover,
.saga-btn.active {
    color: var(--accent-gold);
    border-color: var(--accent-gold); 
    box-shadow: 0 0 18px var(--accent-gold); 
    transform: translateY(-2px); 
}

/* --- TARJETAS DE EPISODIOS (FICHA TÉCNICA) --- */
.grid-container { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 30px; 
    margin-bottom: 80px; 
}

@media (max-width: 992px) {
    .grid-container { grid-template-columns: 1fr; }
    .details-group { flex-direction: column; align-items: flex-start; column-gap: 0; }
    .detail-row { width: 100%; }
	.container-size-group { flex-direction: column !important; align-items: flex-start !important; gap: 6px !important; }
    .size-label { width: 85px !important; margin-right: 0 !important; }
}

.episode-card {
    background: var(--card-bg); 
    border-radius: var(--radius-lg); 
    overflow: hidden;
    display: flex; 
    flex-direction: row; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
    border: 1px solid rgba(212, 175, 55, 0.4); 
    transition: all 0.5s ease;
    align-items: stretch; 
    position: relative; /* Agregado para que funcione el z-index */
}

.episode-card.active:hover {
    transform: translateY(-5px) scale(1.02) !important; 
    box-shadow: 0 0 25px var(--accent-gold); 
    border-color: var(--accent-gold); 
    z-index: 10;
}

.ep-image-wrapper { width: 40%; flex-shrink: 0; }
.ep-image-wrapper img { width: 100%; height: 100%; object-fit: cover; border-right: 1px solid var(--border-color); border-bottom-right-radius: 0; }

/* --- FADE-IN PARA IMÁGENES DE EPISODIOS --- */
.fade-image {
    opacity: 0; /* Empieza totalmente invisible */
    transition: opacity 0.8s ease-in-out !important; /* El tiempo que tarda en aparecer */
}

/* Esta clase se inyecta automáticamente cuando la imagen termina de descargar */
.fade-image.img-loaded {
    opacity: 1; /* Se vuelve visible suavemente */
}

.info { width: 60%; padding: 20px 25px; display: flex; flex-direction: column; box-sizing: border-box; }

.ep-header h3 { 
    color: var(--accent-gold); 
    font-family: 'Inter', sans-serif; 
    margin: 0 0 2px 0; 
    font-size: 0.85rem; 
    font-weight: 900; 
    text-transform: uppercase;
    letter-spacing: 1px; 
}

.ep-title { font-size: 1.2rem; font-weight: 900; color: var(--primary-blue); display: block; margin-bottom: 12px; line-height: 1.2; }

.ep-details { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; font-size: 0.85rem; }
.details-group { display: flex; flex-wrap: wrap; column-gap: 30px; row-gap: 6px; align-items: center; }
.container-size-group { display: flex; flex-direction: row; gap: 25px; align-items: center; }
.size-label { width: auto !important; margin-right: 8px !important; }
.detail-row { display: flex; align-items: center; color: var(--text-muted); }
.detail-label { width: 85px; flex-shrink: 0; font-weight: 700; color: var(--text-dark); }
.detail-content.horizontal { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; }

.bullet-badge { 
    background: #F8FAFC; 
    border: 1px solid var(--border-color); 
    color: var(--text-dark); 
    padding: 2px 8px; 
    border-radius: 4px; 
    font-weight: 600; 
    font-size: 0.75rem; 
    display: inline-flex; 
    align-items: center;
    width: fit-content; 
    transition: all 0.2s ease; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
	cursor: default; 
}
.bullet-badge:hover { background: #fff; border-color: var(--accent-gold); transform: translateY(-1px); box-shadow: 0 3px 6px rgba(212, 175, 55, 0.15); color: var(--primary-blue); }
.bullet-badge.flag-only { padding: 3px 4px; cursor: default; }

.buttons-container { display: flex; gap: 15px; margin-top: auto; align-items: center; background: #F8FAFC; padding: 8px 15px; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.host-btn { padding: 1px 8px; height: 26px; font-size: 0.95rem; border-radius: 4px; background: #fff; border: 1px solid var(--border-color); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.host-btn:hover { background: var(--bg-light); border-color: var(--primary-blue); transform: translateY(-2px); box-shadow: 0 4px 8px rgba(30, 27, 58, 0.1); }

.no-episodes { grid-column: 1 / -1; text-align: center; padding: 60px 20px; background: var(--card-bg); border-radius: var(--radius-lg); border: 1px dashed var(--border-color); color: var(--text-muted); }

.site-footer { 
    border-top: 5px solid var(--accent-gold); /* <- Tu nuevo borde dorado de 5px */
    text-align: center; 
    padding: 40px; 
    background-image: url('../images/bg.webp'); 
    background-repeat: repeat; 
    color: var(--text-muted); 
    font-size: 0.85rem; 
    position: relative; 
    z-index: 10; 
}

/* --- ANIMACIONES Y EFECTOS MODERNOS --- */
@keyframes fadeInPage {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.reveal { opacity: 0 !important; transform: translateY(40px) !important; transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important; will-change: opacity, transform; }
.reveal.active { opacity: 1 !important; transform: translateY(0) !important; }
.latest-grid .reveal:nth-child(1) { transition-delay: 0.1s; }
.latest-grid .reveal:nth-child(2) { transition-delay: 0.2s; }
.latest-grid .reveal:nth-child(3) { transition-delay: 0.3s; }
.latest-grid .reveal:nth-child(4) { transition-delay: 0.4s; }

/* --- RESPONSIVIDAD PARA CELULARES --- */
@media (max-width: 650px) {
    .episode-card { flex-direction: column; }
    .ep-image-wrapper { width: 100%; aspect-ratio: 16 / 9; border-right: none; border-bottom: 1px solid var(--border-color); }
    .info { width: 100%; }
    .details-group { flex-direction: column; align-items: flex-start; }
    .buttons-container { flex-wrap: wrap; }
    .buttons-separator { display: none; }
	.container-size-group { flex-direction: column; align-items: flex-start; gap: 6px; }
    .size-label { width: 85px !important; margin-right: 0 !important; }
}

.thumb-grayscale { filter: grayscale(100%) opacity(0.6); transition: all 0.3s ease; }
.d-none { display: none !important; }
img.thumb-grayscale { filter: grayscale(100%) opacity(0.6) !important; transition: all 0.3s ease !important; }


/* ==========================================================================
   NUEVO FONDO ANIMADO: DOMO Y TIMELAPSE (VERSIÓN ALTA DENSIDAD)
   ========================================================================== */

/* Fondo azul profundo y vibrante (Se carga instantáneamente) */
.deep-space-bg {
    position: fixed; 
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    z-index: -2;
    background: radial-gradient(ellipse at center, #1B1464 0%, #040211 100%);
    
    opacity: 0; /* <--- NUEVO: Inicia apagado */
    /* NUEVO: Entra con la animación 'cosmos-fade' de 4s, pero ESPERA 2 segundos */
    animation: cosmos-fade 4s ease-out 2s forwards;
}

/* El lienzo gigante que girará */
.rotating-sky {
    position: fixed;
    top: 100%; left: 50%;
    width: 200vmax; height: 200vmax;
    margin-left: -100vmax; margin-top: -100vmax;
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
    
    opacity: 0; 
    
    /* NUEVO: Le agregamos el '2s' de retraso al cosmos-fade */
    animation: 
        cosmos-fade 4s ease-out 2s forwards,
        arching-timelapse 300s linear infinite;
}

.arch-layer {
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: transparent;
    border-radius: 50%;
}

/* Asignación del titileo por cada capa de estrellas */
#arch-stars-1 { animation: twinkle-arch 3s infinite alternate ease-in-out; }
#arch-stars-2 { animation: twinkle-arch 4s infinite alternate-reverse ease-in-out; }
#arch-stars-3 { animation: twinkle-arch 5.5s infinite alternate ease-in-out; }
#arch-stars-glow { animation: twinkle-arch 7s infinite alternate-reverse ease-in-out; }

/* Animación de Fade-In para la entrada */
@keyframes cosmos-fade {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Rotación súper fluida del domo */
@keyframes arching-timelapse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Efecto de parpadeo (Menos agresivo para que no desaparezcan del todo) */
@keyframes twinkle-arch {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* --- CONTENEDOR INVISIBLE DEL SANTUARIO --- */
.sanctuary-wrapper {
    position: fixed; 
    bottom: 0; left: 0; 
    width: 100%; height: 100%;
    pointer-events: none; 
    z-index: 0;
    
    /* El contenedor entra con el mismo fade-in de 4s que las estrellas */
    opacity: 0; 
    animation: cosmos-fade 4s ease-out 2s forwards;
}

/* --- LA IMAGEN DE LA SILUETA --- */
.sanctuary-silhouette {
    position: absolute; 
    bottom: 0; left: 0; 
    width: 100%;
    height: 25vw; 
    min-height: 200px; 
    max-height: 512px; 
    
    background-image: url('../images/sanctuary.webp');
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: cover; 
    
    /* Inicia en 0.2 fijos. JS se encargará del resto al hacer scroll */
    opacity: 0.2; 
    will-change: transform, opacity;
}

/* Animación especial para que el Santuario nazca al 20% */
@keyframes sanctuary-init-fade {
    0% { opacity: 0; }
    100% { opacity: 0.2; }
}

/* Animación para que el Santuario nazca a los 2 segundos */
@keyframes reveal-sanctuary {
    to { visibility: visible; }
}

/* --- ANIMACIÓN EN CASCADA ESTRICTA Y SECUENCIAL --- */
@keyframes cascadeReveal {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Efecto de Fade-in exclusivo para la imagen del banner */
@keyframes bannerFadeIn {
    0% { opacity: 0; transform: scale(1.03); }
    100% { opacity: 1; transform: scale(1); }
}

/* Ocultamos todas las secciones principales al inicio, incluyendo la barra superior */
.top-bar,
.site-header, 
.latest-section, 
.main-content, 
.site-footer {
    opacity: 0;
    /* Cada bloque tardará exactamente 0.6 segundos en aparecer */
    animation: cascadeReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 1. Barra de idiomas y Contenedor del Banner (Inician JUNTOS a los 0.2s) */
.top-bar, 
.site-header { 
    animation-delay: 0.2s; 
}

/* La imagen del Banner (Fade-in suave iniciando a los 0.2s) */
.banner {
    opacity: 0;
    animation: bannerFadeIn 1s ease-out forwards;
    animation-delay: 0.2s;
}

/* 2. Últimos Episodios (Espera a que terminen los de arriba: 0.2 + 0.6 = 0.8s) */
.latest-section { animation-delay: 0.8s; }

/* 3. Sección de Descargas (Espera a que termine latest-section: 0.8 + 0.6 = 1.4s) */
.main-content { animation-delay: 1.4s; }

/* 4. Footer (Espera a que termine main-content: 1.4 + 0.6 = 2.0s) */
.site-footer { animation-delay: 2.0s; }

/* --- MODALES VIP --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(11, 16, 33, 0.85);
    backdrop-filter: blur(8px); /* Efecto cristal esmerilado */
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active { opacity: 1; }

.modal-box {
    background: #ffffff;
    width: 90%;
    max-width: 380px;
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--accent-gold);
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.15);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-box { transform: translateY(0); }

.close-modal {
    position: absolute;
    top: 15px; right: 15px;
    background: none; border: none;
    font-size: 1.5rem; color: var(--text-muted);
    cursor: pointer; transition: 0.2s;
}

.close-modal:hover { color: var(--danger); }

.input-group { margin-bottom: 15px; text-align: left; }
.input-group label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--primary-blue); margin-bottom: 5px; }
.input-group input { width: 100%; padding: 10px; box-sizing: border-box; border: 1px solid var(--border-color); border-radius: var(--radius-md); font-family: 'Inter', sans-serif; }
.input-group input:focus { outline: none; border-color: var(--accent-gold); }

/* --- ANIMACIÓN DE COBRO VIP --- */
.credit-deduction-anim {
    position: absolute;
    color: var(--danger);
    font-weight: 900;
    font-size: 1.5rem;
    pointer-events: none;
    z-index: 100;
    animation: floatMinusOne 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    text-shadow: 0px 2px 4px rgba(0,0,0,0.3);
}

@keyframes floatMinusOne {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    50% { transform: translateY(-25px) scale(1.2); }
    100% { opacity: 0; transform: translateY(-40px) scale(1); }
}

.unlock-btn {
    position: relative; /* Necesario para que el -1 flote relativo al botón */
    transition: all 0.3s ease;
}

/* --- BOTONES PREMIUM PARA MODALES --- */
.modal-action-btn {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1a2a40 100%);
    color: #fff;
    border: 1px solid rgba(212, 175, 55, 0.4); /* Dorado sutil */
    border-radius: 25px; /* Forma de píldora elegante */
    padding: 12px 20px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.modal-action-btn:hover {
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.3);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
}

/* Variante para el botón Log Out */
.modal-action-btn.logout-btn {
    background: #fff;
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: none;
}

.modal-action-btn.logout-btn:hover {
    background: rgba(239, 68, 68, 0.05);
    border-color: var(--danger);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.15);
}

/* --- ESTADO "PENSANDO" (SPINNER ANIMADO) --- */
.modal-action-btn.is-loading {
    pointer-events: none; /* Evita doble clic */
    color: transparent !important; /* Esconde el texto mágicamente */
}

.modal-action-btn.is-loading::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin-loader 0.8s linear infinite;
    left: calc(50% - 11px);
    top: calc(50% - 11px);
}

.modal-action-btn.logout-btn.is-loading::after {
    border: 3px solid rgba(239, 68, 68, 0.2);
    border-top-color: var(--danger);
}

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

/* --- BUSCADOR EN TIEMPO REAL --- */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
/* Específico para el icono de la lupa */
.search-wrapper .search-icon {
    position: absolute;
    left: 12px;
    color: rgba(255,255,255,0.5);
    width: 16px;
    height: 16px;
    pointer-events: none;
}
/* Botón de la X para limpiar */
.search-wrapper .clear-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    width: 20px;
    height: 20px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}
.search-wrapper .clear-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.2);
}
.search-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    /* Le agregamos 36px de espacio a la derecha para que el texto no choque con la X */
    padding: 8px 36px 8px 36px; 
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    width: 200px;
    transition: all 0.3s ease;
}
.search-input::placeholder { color: rgba(255,255,255,0.5); }
.search-input:focus {
    outline: none;
    width: 250px;
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* --- SWITCH DE IDIOMAS COMPACTO --- */
.lang-pill {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 30px;
    padding: 3px;
    align-items: center;
}
.lang-pill button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lang-pill button img {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    display: block;
    transition: transform 0.2s;
}
.lang-pill button:not(.active):hover img {
    transform: scale(1.1);
}
.lang-pill button.active {
    background: var(--accent-gold);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Responsividad para la barra superior */
@media (max-width: 650px) {
    .top-bar-container { flex-direction: column; gap: 15px; }
    .search-input { width: 100%; }
    .search-input:focus { width: 100%; }
    .right-controls { width: 100%; justify-content: space-between; }
}