body {
    margin: 0;
    font-family: "Consolas", monospace;
    background: #0a0a0f;
    color: #0affea;
    text-shadow: 0 0 8px #0affea;
}

header {
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid #0affea;
}

nav a {
    margin: 0 15px;
    color: #0affea;
    text-decoration: none;
    font-size: 18px;
}

nav a:hover {
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
}

main {
    width: 80%;
    margin: auto;
    padding: 20px;
}

.center-text {
    text-align: center;
}

.block {
    margin-bottom: 40px;
}

.neon-block {
    border: 1px solid #0affea;
    padding: 15px;
    box-shadow: 0 0 15px #0affea;
}

.download-btn {
    color: #0affea;
    border: 1px solid #0affea;
    padding: 8px 15px;
    text-decoration: none;
    text-shadow: 0 0 10px #0affea;
}

.download-btn:hover {
    color: #ff00ff;
    border-color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
}

/* Артефакты */
.artifact {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.artifact img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border: 1px solid #0affea;
    box-shadow: 0 0 10px #0affea;
}

/* Персонажи */
.character {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.character img {
    width: 150px;
    border: 1px solid #0affea;
    box-shadow: 0 0 10px #0affea;
}

.char-info {
    max-width: 600px;
}

/* Галерея */
.gallery {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.gallery img {
    width: 100%;
    border: 1px solid #0affea;
    box-shadow: 0 0 15px #0affea;
}

/* Логотип */
.logo {
    font-size: 48px;
    color: #0affea;
    text-shadow: 0 0 20px #0affea, 0 0 40px #0099aa;
    margin-bottom: 10px;
}

/* Версия */
.version-label {
    position: fixed;
    bottom: 10px;
    left: 10px;
    color: #0affea;
    font-size: 16px;
    opacity: 0.7;
    text-shadow: 0 0 10px #0affea;
    pointer-events: none; /* чтобы надпись не мешала кликам */
}



/* ============================
   Адаптация под телефоны
   ============================ */

@media (max-width: 768px) {

    /* Исправляем выравнивание кнопок "Смотреть" на мобилках */
.toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* чтобы текст переносился, если нужен */
    margin-bottom: 5px; /* небольшой отступ вниз */
}

.toggle-container b {
    flex: 1; /* текст занимает оставшееся место */
    text-align: left;
}

.toggle-container .toggle-btn {
    flex-shrink: 0; /* кнопка не сжимается */
    margin-left: 10px;
    padding: 4px 10px;
    font-size: 14px;
}


    header h1,
    .logo {
        font-size: 32px;
    }

    nav a {
        display: inline-block;
        margin: 8px 10px;
        font-size: 16px;
    }

    main {
        width: 95%;
        padding: 10px;
    }

    /* Персонажи */
    .character {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .character img {
        width: 200px;
    }

    .char-info {
        max-width: 100%;
    }

    /* Артефакты */
    .artifact {
        flex-direction: column;
        text-align: center;
    }

    .artifact img {
        width: 150px;
        height: 150px;
    }

    /* Галерея */
    .gallery {
        grid-template-columns: 1fr;
    }

    /* Кнопки */
    .download-btn {
        display: inline-block;
        padding: 10px 20px;
        font-size: 16px;
    }

    /* Версия */
    .version-label {
        font-size: 14px;
        bottom: 5px;
        left: 5px;
    }
}


.upload-box {
    text-align: center;
    margin-bottom: 20px;
}

.upload-btn {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid #0affea;
    color: #0affea;
    cursor: pointer;
    text-shadow: 0 0 10px #0affea;
}

.upload-btn:hover {
    border-color: #ff00ff;
    color: #ff00ff;
}

.img-wrapper .del-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #0affea;
    text-shadow: 0 0 8px #0affea;
    filter: drop-shadow(0 0 5px #0affea);
    transition: 0.3s;
}

.img-wrapper .del-btn svg {
    display: block;
}

.img-wrapper .del-btn:hover {
    color: #ff00ff;
    text-shadow: 0 0 12px #ff00ff;
    filter: drop-shadow(0 0 10px #ff00ff);
}



.console-container {
    margin-top: 20px;
    text-align: center;
}

.console-container input {
    width: 60%;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #0affea;
    background: transparent;
    color: #0affea;
    text-shadow: 0 0 8px #0affea;
    outline: none;
}

.console-container button {
    padding: 8px 12px;
    margin-left: 5px;
    border: 1px solid #0affea;
    background: transparent;
    color: #0affea;
    cursor: pointer;
    text-shadow: 0 0 8px #0affea;
}

.console-container button:hover,
.console-container input:focus {
    color: #ff00ff;
    border-color: #ff00ff;
    text-shadow: 0 0 12px #ff00ff;
}



.disabled-upload {
    opacity: 0.3;
    pointer-events: none;
}

/* Кнопка "Назад" для глав */
#backBtn {
    display: none; /* скрыта по умолчанию */
    padding: 10px 20px;
    font-size: 16px;
    border: 2px solid #0affea;
    background: transparent;
    color: #0affea;
    cursor: pointer;
    text-shadow: 0 0 10px #0affea;
    box-shadow: 0 0 15px #0affea;
    transition: 0.3s;
    border-radius: 5px;
    margin-top: 15px;
}

#backBtn:hover {
    color: #ff00ff;
    border-color: #ff00ff;
    text-shadow: 0 0 15px #ff00ff;
    box-shadow: 0 0 25px #ff00ff;
}

/* Фиксируем размеры картинок персонажей */
.character img {
    width: 200px;       /* можно менять под дизайн */
    height: auto;       /* сохраняем пропорции */
    object-fit: cover;  /* чтобы изображение не растягивалось */
    border-radius: 10px;
}

/* Модальное окно лора */
.rin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    color: #0affea;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    overflow-y: auto;   /* ключевой момент: скролл при длинном тексте */
}

.rin-modal-content {
    max-width: 900px;
    line-height: 1.6;
    white-space: pre-line; /* сохраняет переносы строк */
}

.rin-modal-close {
    margin-top: 20px;
    padding: 10px 20px;
    border: 2px solid #0affea;
    background: transparent;
    color: #0affea;
    cursor: pointer;
    border-radius: 5px;
    text-shadow: 0 0 10px #0affea;
    font-size: 16px;
}

/* Кнопка "Смотреть" на странице персонажей */
.lore-btn {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #0affea;
    border-radius: 6px;
    color: #0affea;
    background: transparent;
    font-weight: bold;
    text-shadow: 0 0 6px #0affea;
    box-shadow: 0 0 10px #0affea;
    cursor: pointer;
    font-family: inherit;
    transition: 0.3s;
}

.lore-btn:hover {
    color: #ff00ff;
    border-color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
    box-shadow: 0 0 15px #ff00ff;
}

.character img {
    width: 200px;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #0affea;
    box-shadow: 0 0 10px #0affea;

    margin-top: 20px; /* <-- добавляем отступ сверху */
}

.gallery {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* соотношение сторон 4:3 */
    overflow: hidden;
    border: 1px solid #0affea;
    border-radius: 10px;
    box-shadow: 0 0 15px #0affea;
    background: #0a0a0f;
}

.img-wrapper img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover; /* можно заменить на contain, если не хотите обрезку */
    border-radius: 10px;
}


.chapter-btn {
    color: #0affea;
    border: 1px solid #0affea;
    padding: 8px 15px;
    text-decoration: none;
    text-shadow: 0 0 10px #0affea;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
    border-radius: 5px;
}

.chapter-btn:hover {
    color: #ff00ff;
    border-color: #ff00ff;
    text-shadow: 0 0 12px #ff00ff;
}
