/* Стили для контейнера персонажей Kioria */
.character-encycl-card {
    z-index: 10;
}

.encycl-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2c3e50;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    /* box-shadow: 0 4px 20px rgba(0,0,0,0.15); */
    backdrop-filter: blur(10px);
}

.encycl-link:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.25);
}

.encycl-icon img {
    transition: transform 0.3s ease;
    width: 56px;
    height: 56px;
}

.encycl-link:hover .encycl-icon img {
    transform: rotate(5deg) scale(1.1);
}

.encycl-text h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 700;
}

.encycl-text p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

/* Скрываем мобильный текст по умолчанию */
.encycl-mobile-text {
    display: none;
    font-weight: 600;
    font-size: 12px;
    margin-top: 4px;
}

/* Адаптация для планшетов и мобильных */
@media (max-width: 992px) {
    .character-encycl-card {
        /* top: 20px;
        right: 50%; */
        /* transform: translateX(50%); */
        left: auto;
    }
    
    .encycl-text {
        display: none; /* Скрываем текст */
    }
    
    /* Показываем мобильный текст */
    .encycl-mobile-text {
        display: block;
    }
    
    .encycl-icon img {
        width: 77px;
        height: 77px;
    }
    
    .encycl-link {
        padding: 15px;
        justify-content: center;
        flex-direction: column;
        text-align: center;
    }
}

/* Дополнительная адаптация для очень маленьких экранов */
@media (max-width: 480px) {
    .character-encycl-card {
        top: 10px;
    }
    
    .encycl-icon img {
        width: 80px;
        height: 80px;
    }
    
    .encycl-link {
        padding: 12px;
    }
    
    .encycl-mobile-text {
        font-size: 11px;
    }
}

/* Стили для модального окна персонажей Kioria 1 */
.kioria1-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow-y: auto;
}

.kioria1-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    margin: 2% auto;
    padding: 30px;
    border-radius: 15px;
    max-width: 1200px;
    width: 90%;
    color: white;
    position: relative;
}

.kioria1-character-modal h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    color: #a8e6cf;
}

.kioria1-modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
}

.kioria1-modal-close:hover {
    color: #a8e6cf;
}

.kioria1-characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.kioria1-character-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kioria1-character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(168, 230, 207, 0.2);
}

.kioria1-character-card img {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid #a8e6cf;
}

.kioria1-character-card h3 {
    margin: 10px 0;
    color: #a8e6cf;
    font-size: 1.4rem;
}

.kioria1-character-card p {
    color: #d4f1ff;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Адаптивность для модального окна */
@media (max-width: 768px) {
    .kioria1-modal-content {
        margin: 5% auto;
        padding: 20px;
        width: 95%;
    }
    
    .kioria1-character-modal h2 {
        font-size: 1.45rem;
    }
    
    .kioria1-characters-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .kioria1-character-card {
        padding: 15px;
    }
    
    .kioria1-character-card img {
        width: 200px;
        height: 200px;
    }
}

/* Делаем кнопку похожей на ссылку */
#kioria1-openCharactersModal {
    background: #bbd7ff4f;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    padding: 11px;
    margin: 0;
}