:root {
    /* Colores base - ajusta según tu tema */

    --surface: #0f3460;
    --surface-light: #1a2a4a;
    --primary-color: #e94560;
    --text-title: #ffffff;
    --text-secondary: #b8c2d9;
    --border-color: rgba(255, 255, 255, 0.1);
    --color-primary: #3a7bd5;
    --color-secondary: #00d2ff;
    --text-color: #ffffff;
    --card-size: 80px;
    --card-gap: 10px;
    --block-size: clamp(10px, 10vw, 80px);
    /* Mínimo 50px, ideal 8vw, máximo 100px */
    --boss-size: calc(var(--block-size) * 3);
}

/* === ESTILOS GENERALES === */
h1,
h2,
h3,
h4,
h5 {
    color: var(--text-title);
    margin-top: 0;
}

.main-content h1 {
    font-size: 3rem;
    color: var(--text-title);
    margin-bottom: 1.5rem;
    font-weight: bold;
    position: relative;
}

.main-content {
    padding-left: 2rem;
}

.weekly-boss-container {
    display: grid;
    grid-template-columns:
        var(--boss-size)
        /* Col 1: Jefe (30) */
        var(--block-size)
        /* Col 2: Drops (10) */
        repeat(4, var(--block-size));
    /* Cols 3-6: Personajes (10) */
    grid-template-rows:
        repeat(3, var(--block-size));
    /* 3 filas de 10 */
    gap: 0;
    width: fit-content;
    margin: 0 auto;
}

/* === Bloque del Jefe (30x30) === */
.boss-image {
    grid-column: 1;
    grid-row: 1 / span 3;
    /* Ocupa 3 filas de 10 = 30 */
    aspect-ratio: 1/1;
    /* Forzar cuadrado */
    display: flex;
    align-items: center;
    justify-content: center;

    background-color: var(--color-rarity-5);
    /* Color de fondo para el jefe */


}

.boss-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;

}

/* === Bloques de Drops (10x10) === */
.drops-container {
    grid-column: 2;
    grid-row: 1 / span 3;
    display: grid;
    grid-template-rows: repeat(3, var(--block-size));

}

.drop-item {
    aspect-ratio: 1/1;
    /* Cuadrado */
    display: flex;
    align-items: center;
    justify-content: center;

    background-color: var(--color-rarity-5);
    /* Color de fondo para los drops */

}

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

.drop-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;


}

/* === Bloques de Personajes (10x10) === */
.character {
    aspect-ratio: 1/1;
    display: flex;
    justify-content: center;
    background-color: var(--color-bg-secondary);
    /* Color de fondo para los personajes */
    border: 1px solid var(--color-rarity-5);
}

.container {
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Selector de días */
.days-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.day-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-color);
    padding: 10px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.5rem;
    transition: all 0.3s ease;
}

.day-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.day-button.active {
    background: var(--color-primary);
    font-weight: bold;
}

/* Contenedor de dominios */
.domains-container {
    display: grid;
    gap: 0.2rem;
    margin-bottom: 1rem;
}

.domain-section {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2rem;
    border-radius: 10px;
}

.domain-title {
    font-size: 0.8rem;
    margin-bottom: 1rem;
    padding-left: 10px;
    border-left: 4px solid var(--surface-light);
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.2rem;
    padding: 0.2rem;
    justify-items: center;
}

/* Cards cuadradas */
.material-card {
    width: 80px;
    margin-bottom: 0.1rem;
    position: relative;
}

.card-icon-container {
    width: 100%;
    height: 80px;
    position: relative;
    overflow: hidden;
    border-radius: 10%;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}



.card-icon {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
}


.card-name-container {
    position: relative;
    width: 100%;
    text-align: center;
    margin-top: 0.1rem;
}

.card-name {
    color: white;

    font-size: 0.5rem;
    font-weight: 500;
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-align: center;
    box-sizing: border-box;
    display: none;

}

/* Estilos para el ícono del dominio */
.domain-icon {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}


/* Estilos para acordeones */
.domain-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.2rem;
    
}

.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    background: rgba(30, 30, 50, 0.5);
    cursor: pointer;
    user-select: none;
    
}

.domain-title {
    font-size: 1rem;
    margin: 0;
    padding-left: 1rem;
    border-left: 4px solid var(--surface-light);
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.domain-content {
    padding: 0 0.2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.domain-section.expanded .domain-content {
    max-height: 2000px;
    padding: 0.2rem;
}





/* Mejoras para los botones de día */
.day-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-color);
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.day-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.day-button.active {
    background: var(--surface);
    font-weight: bold;
}




/* === Navegación circular de jefes === */
.boss-navigation {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
}

.boss-button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: var(--color-rarity-5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.boss-button:hover {
    transform: scale(1.1);
    border-color: var(--color-primary);
}

.boss-button.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.7);
}

.boss-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* === CONTENEDOR PADRE PARA BOSSES === */
#boss-displays {
    position: relative;
}

/* === CONTENEDORES DE BOSS - SOLUCIÓN SIN FLICKERING === */
.boss-display-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.boss-display-container.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    pointer-events: all;
}

/* === ANIMACIÓN BLUR FADE === */
@keyframes blurFade {
    from {
        opacity: 0;
        filter: blur(5px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

.boss-display-container.active {
    animation: blurFade 0.4s ease;
}