/* ─── ESTILOS GENERALES Y RESET ─── */
* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #000000; /* Fondo negro absoluto */
    background-image: url('../svg/Background.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}

/* ─── NAVBAR DE NAVEGACIÓN ─── */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 40px 0;
    z-index: 20;
    pointer-events: none;
}

.nav-prev-label,
.nav-next-label {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
    transition: color 0.25s ease, text-shadow 0.25s ease;
    pointer-events: auto;
    cursor: pointer;
    white-space: nowrap;
    z-index: 1;
}

.nav-prev-label:hover,
.nav-next-label:hover {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.nav-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cinzel', serif;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: white;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    top: 18px;
}

/* ─── CONTENEDOR PRINCIPAL Y SECCIONES ─── */
.main-container {
    position: relative;
    display: flex;
    width: 100vw;
    height: 100vh;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sections-wrapper {
    position: relative;
    width: 85vw;
    height: 85vh;
    margin: 0 auto;
    overflow: hidden;
}

/* ─── FADE DIRECCIONAL ─── */
.sections-wrapper.switching-next {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 100%);
}
.sections-wrapper.switching-prev {
    -webkit-mask-image: linear-gradient(to right, black 0%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, black 0%, black 92%, transparent 100%);
}

/* ─── BOTONES LATERALES DE NAVEGACIÓN ─── */
.side-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: auto;
    cursor: pointer;
    transition: transform 0.2s;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.side-button.left  { left: 40px; }
.side-button.right { right: 40px; }

.side-button:hover { transform: translateY(-50%) scale(1.1); }

/* ─── SLOTS ─── */
.slot {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: none;
    opacity: 0;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    will-change: transform, opacity;
}
.slot.active-slide { display: flex !important; }

/* ─── CONTENT AREA ─── */
.content-area {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 60px;
}

.content-area header {
    width: 100%;
    text-align: center;
}

/* El h2 interno de cada sección queda oculto — el título lo muestra el navbar */
header h2 {
    display: none;
}

/* ─── CAJAS (El look "Vacío" y Oscuro) ─── */
.slot-box {
    background-color: rgba(0, 0, 0, 0.5); /* Negro profundo con transparencia */
    border-radius: 4px;
}

.sub-box {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ─── INTERACTIVOS ─── */
.interactive-item {
    object-fit: contain;
    cursor: pointer;
    transition: filter 0.3s ease, transform 0.15s ease;
    /* Resplandor sutil base sobre fondo negro */
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.1));
}

.interactive-item.disabled { 
    filter: brightness(0.2) grayscale(0.5); 
    pointer-events: auto; /* Mantener clickeable según requerimiento */
}

.interactive-item.disabled:hover { 
    filter: brightness(0.35) grayscale(0.3); 
}

.interactive-item:not(.disabled):hover { 
    filter: brightness(1.3) drop-shadow(0 0 10px rgba(255, 255, 255, 0.3)); 
    transform: scale(1.05); 
}

/* Feel de botón — rápido y limpio al hacer click */
.interactive-item:not(.disabled):active {
    transform: scale(0.93);
    filter: brightness(1.5) drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    transition: transform 0.06s ease, filter 0.06s ease;
}

.interactive-item.locked {
    cursor: not-allowed;
}

/* ─── GRID DE CÍRCULOS (CHARMS / BOSSES) ─── */
.grid-circle-slot {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: border-color 0.3s, background-color 0.3s;
}
.grid-circle-slot:hover { 
    border-color: rgba(255, 255, 255, 0.4); 
    background-color: rgba(255, 255, 255, 0.02);
}

/* ─── SPELLS ─── */
.interactive-spell {
    width: auto; height: 75px;
    object-fit: contain;
    cursor: pointer;
    transition: filter 0.3s ease, transform 0.1s ease;
}
.interactive-spell.disabled { 
    filter: brightness(0.2) grayscale(0.5); 
}
.interactive-spell:not(.disabled):hover {
    filter: brightness(1.3) drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    transform: scale(1.05);
}

/* ─── PANTALLA BOSSES ─── */
#pantalla-bosses .slot-box {
    width: 90%;
    height: 75vh;
    padding: 30px;
}

#pantalla-bosses .slot-box.bosses-scroll-container {
    width: 90%; height: 75vh;
    padding: 20px 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 20px;
}
.boss-section-group { width: 100%; display: flex; flex-direction: column; gap: 18px; }
.boss-section-title {
    font-family: 'Cinzel', serif;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 8px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}
.boss-grid-layout {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    row-gap: 20px;
    column-gap: 10px;
    width: 100%;
    justify-items: center;
    align-items: start;
}
.boss-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}
#pantalla-bosses .grid-circle-slot { width: 68px; height: 68px; }
.boss-name {
    font-family: 'Cinzel', serif;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.68rem;
    text-align: center;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: color 0.3s ease;
    padding-top: 4px;
}
.boss-card:hover .interactive-item:not(.disabled) ~ .boss-name {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
}

/* ─── PANTALLA INVENTARIO ─── */
#pantalla-inventario .main-inventory-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 75vh;
    gap: 20px;
}

.inv-col-1 { width: 33%; height: 100%; }
.inv-col-2 { width: 34%; height: 100%; position: relative; }
.inv-col-3 { width: 33%; height: 100%; }

.grid-layout-1 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: calc(40% - 7px) calc(45% - 7px) calc(15% - 6px);
    gap: 10px;
    padding: 10px;
    height: 100%;
}
.item-1 { grid-column: 1; grid-row: 1; }
.item-2 { grid-column: 2; grid-row: 1; }
.item-3 { grid-column: 3; grid-row: 1; }
.item-4 { grid-column: 1; grid-row: 2 / span 2; height: 100%; padding: 15px; }
.item-5 { grid-column: 2 / span 2; grid-row: 2; height: 100%; }
.item-6 { grid-column: 2 / span 2; grid-row: 3; height: 100%; padding: 5px; }

.flex-layout-2 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 15px;
    padding: 15px;
    height: 100%;
}
.amuleto-top { height: 62%; flex-shrink: 0; }
.amuleto-bottom.colosseums-container {
    height: 33%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
}
.colosseums-title {
    color: white;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}
.colosseums-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    width: 100%;
    height: 70%;
}
.colosseums-row .interactive-item {
    height: 130%;
    max-height: none;
    width: auto;
    object-fit: contain;
}

.flex-layout-3 {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 15px;
    padding: 15px;
    height: 100%;
}
.desc-top { height: 78%; flex-shrink: 0; }
.dreamers-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.desc-bottom {
    height: 16%;
    flex-shrink: 0;
    width: 100%;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 20px;
}
#completion-text {
    color: white;
    font-size: 25px;
    text-align: right;
    margin: 0;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
}

/* Líneas divisorias de Inventario */
.inv-col-2::before,
.inv-col-2::after {
    content: "";
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
    z-index: 2;
}
.inv-col-2::before { left: -10px; }
.inv-col-2::after  { right: -10px; }

/* ─── PANTALLA CHARMS ─── */
#pantalla-charms .slot-box {
    width: 95%;
    height: 75vh;
    padding: 25px;
}
.charms-grid-layout {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 15px 10px;
    padding: 20px;
    min-height: 400px;
}
.charm-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
}
.charm-name {
    font-family: 'Cinzel', serif;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.6rem;
    text-align: center;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-transform: uppercase;
    transition: color 0.3s ease;
}
.charm-card:hover .interactive-item:not(.disabled) ~ .charm-name,
.charm-card:hover .charm-name {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
}

/* ─── TAMAÑOS Y CONTENEDORES ESPECÍFICOS ─── */
#mask { width: 152px; height: 206px; object-fit: contain; }

.item-2.item-stacked-vertical {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}
.god-tuner-small { width: auto; height: 90px; object-fit: contain; }

.vessel-small {
    width: auto;
    height: 85px;
    object-fit: contain;
    cursor: pointer;
    transition: filter 0.3s ease, transform 0.1s ease;
}
.vessel-small:hover {
    transform: scale(1.05);
    filter: brightness(1.3) drop-shadow(0 0 8px rgba(255,255,255,0.5));
}

.dream-nail-large {
    width: 100%; height: 100%;
    max-height: none !important;
    object-fit: contain;
    padding: 10px;
}

.item-4 img {
    height: 100%; width: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: filter 0.3s ease, transform 0.1s ease;
}
.item-4 img:hover {
    filter: brightness(1.3) drop-shadow(0 0 8px rgba(255,255,255,0.5));
    transform: scale(1.03);
}

.nail-arts-container {
    display: flex;
    justify-content: space-around;
    width: 100%; height: 100%;
}
.nail-arts-container .interactive-item { height: 130%; width: auto; }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: auto;
    gap: 15px;
    padding: 15px;
    align-content: start;
}
.skills-grid .interactive-item { width: 100%; height: auto; max-height: 100px; }

.dreamers-container .interactive-item { width: auto; height: 200px; margin-top: -60px; }

/* ─── SPELLS GRID ─── */
.item-5.spells-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    grid-template-areas:
        "top-left    .    top-right"
        "    .     center     .    "
        "    .     bottom     .    ";
    justify-items: center;
    align-items: center;
    padding: 5px;
    height: 100%;
}
#focus        { grid-area: center; object-fit: contain; pointer-events: none; }
#spellTopLeft { grid-area: top-left;  margin-bottom: -35px; margin-right: -45px; }
#spellTopRight{ grid-area: top-right; margin-bottom: -35px; margin-left: -45px;  }
#spellBottom  { grid-area: bottom; margin-top: 3px; height: 93px; }

/* ─── TEXTO CLEAR ─── */
#text-clear {
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    cursor: pointer;
    margin-top: 12px;
    margin-bottom: 0;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 5px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}
#text-clear:hover {
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.pantheon-link { color: inherit; text-decoration: none; transition: color 0.2s ease, text-shadow 0.2s ease; }

/* ─── LÓGICAS DE ESTADOS ESPECÍFICOS (NKG y Dreamers) ─── */

/* 1. NKG: Comportamiento normal como jefe (igual que Xero) */
/* Solo se oscurece si está explícitamente en modo 'locked' por Carefree */
img[alt="NKG"][data-nkg-locked="true"] {
    filter: brightness(0.2) grayscale(1) !important;
    cursor: not-allowed !important;
    pointer-events: none; /* Evita clics si está bloqueado */
}

/* 2. Dreamers: Mantienen su estado visual específico */
#monomon.disabled, #lurien.disabled, #herrah.disabled {
    filter: brightness(0.3) grayscale(0.4) !important;
    transition: filter 0.3s ease;
}

/* 3. Asegurar que los jefes (incluido NKG cuando NO está locked) brillen al pasar el mouse */
.boss-grid-layout .interactive-item:hover:not([data-nkg-locked="true"]) {
    filter: brightness(1.3) drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    transform: scale(1.05);
}

/* ─── ICONOS INLINE E INTERFAZ CHECKS ─── */
.inline-icon {
    width: 18px;      /* Ajusta al tamaño de tu fuente */
    height: 18px;
    vertical-align: middle;
    margin-right: 5px; /* Separación entre el icono y el texto */
    pointer-events: none; /* Para que no interfiera con el clic del checkbox */
    filter: drop-shadow(0 0 1px rgba(255,255,255,0.5)); /* Tema oscuro */
}

/* ==========================================================================
   SISTEMA DE BLOQUEO DE ORIENTACIÓN (PORTRAIT)
   ========================================================================== */

/* Oculto por defecto en PC y pantallas horizontales */
#bloqueo-orientacion {
    display: none;
}

/* Se activa CADA VEZ que el cel se pone en vertical */
@media screen and (max-width: 768px) and (orientation: portrait) {
    #bloqueo-orientacion {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        /* Usamos dvh para asegurar que tape el 100% real aunque Chrome saque sus barras */
        height: 100dvh !important; 
        background-color: #111111 !important; /* Gris oscuro estilo HK */
        z-index: 999999 !important; /* Más arriba que el mismísimo Rey Pálido */
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        padding: 20px;
        box-sizing: border-box;
    }

    .contenido-bloqueo {
        color: #8f8f8f;
        font-family: 'Trajan Pro', sans-serif;
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .icono-giro {
        width: 64px;
        height: 64px;
        margin-bottom: 15px;
        color: #c3b499;
        animation: rotarCelular 2s ease-in-out infinite;
    }
}

/* Fuerza el ocultamiento absoluto cuando el dispositivo está acostado */
@media screen and (orientation: landscape) {
    #bloqueo-orientacion {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }
}

@keyframes rotarCelular {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-90deg); }
}

/* ==========================================================================
   AJUSTE DE CAPAS (Z-INDEX) PARA BOTONES LATERALES EN MÓVIL
   ========================================================================== */

/* Las esquinas decorativas se van al fondo para no estorbar el touch */
.inventory-borders, 
.hud-corners,
#pantalla-inventario::before,
#pantalla-inventario::after {
    z-index: 1 !important;
    pointer-events: none !important; /* Hace que los clics atraviesen el adorno */
}

/* Los botones de navegación se traen al frente absoluto */
.nav-buttons-container,
.bosses-nav-btn,
.charms-nav-btn,
#pantalla-inventario .top-nav-links,
#pantalla-inventario a[href*="bosses"],
#pantalla-inventario a[href*="charms"] {
    position: relative !important;
    z-index: 99999 !important; /* Por encima de las esquinas */
    pointer-events: auto !important; /* Asegura que registren el tap del dedo */
    cursor: pointer !important;
}

/* ==========================================================================
   FIJACIÓN QUIRÚRGICA — POSICIÓN DE TUERCA Y EFECTO NO-FX
   ========================================================================= */

/* 1. Curar la especificidad de NO-FX (El interruptor de efectos visuales)
   Le ganamos a tus otros archivos forzando el selector 'div' y '!important' */
body.no-fx div.glass-panel-local,
body.no-fx div#bloqueo-orientacion {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(15, 15, 15, 0.98) !important; /* Fondo opaco rápido */
    box-shadow: none !important;
}

body.no-fx .animate-scale-in,
body.no-fx .animate-scale-out {
    animation: none !important; /* Desactiva animaciones */
}


/* 2. Alinear la tuerca junto a Clear Tracker en móvil (En Horizontal) */
.desc-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-around !important;
    gap: 5px !important;
}

/* Contenedor que integra el texto y el botón */
.container-clear-ajustes {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important; /* Espacio entre texto y tuerca */
    width: auto !important;
    margin-bottom: 2px !important;
}

/* El texto de Clear Tracker original */
#text-clear {
    margin: 0 !important;
    display: inline-block !important;
    font-size: 0.8rem !important; /* Ajuste para que quepa bien en horizontal */
}

/* Ajuste del botón de la tuerca para que sea táctil pero minimalista */
#btn-ajustes-hud {
    background: rgba(245, 245, 240, 0.03) !important;
    border: 1px solid rgba(245, 245, 240, 0.2) !important;
    border-radius: 4px !important;
    color: rgba(245, 245, 240, 0.6) !important;
    padding: 4px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    outline: none !important;
}

/* Hover estético */
#btn-ajustes-hud:hover {
    background: rgba(245, 245, 240, 0.15) !important;
    color: #FFFFFF !important;
    box-shadow: 0 0 6px rgba(245, 245, 240, 0.3) !important;
    transform: scale(1.05) !important;
}

/* 3. Fijación del Popup en móvil (Para que no flote) */
div#modal-ajustes {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 320px !important;
    height: auto !important;
    max-height: 240px !important;
    padding: 18px !important;
    z-index: 99999 !important; /* Por encima de todo */
}


/* --- SWITCHES ESTILO MINIMALISTA CREMA (Integrados) --- */
.ajustes-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 15px;
    padding: 5px;
}
.ajuste-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(245, 245, 240, 0.04);
    padding-bottom: 8px;
}
.switch-game { position: relative; display: inline-block; width: 42px; height: 22px; flex-shrink: 0; }
.switch-game input { opacity: 0; width: 0; height: 0; }
.slider-game {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(15, 15, 15, 0.8);
    border: 1px solid rgba(245, 245, 240, 0.3);
    transition: .2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
}
.slider-game:before {
    position: absolute; content: ""; height: 14px; width: 14px;
    left: 3px; bottom: 3px; background-color: rgba(245, 245, 240, 0.5);
    transition: .2s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 2px;
}
input:checked + .slider-game { border-color: rgba(245, 245, 240, 0.8); box-shadow: 0 0 8px rgba(245, 245, 240, 0.2); }
input:checked + .slider-game:before { transform: translateX(20px); background-color: #F5F5F0; box-shadow: 0 0 5px rgba(245, 245, 240, 0.6); }

/* Control de visibilidad del modal */
.hidden {
    display: none !important;
}
