/* ==================== МОДАЛЬНЫЕ ОКНА ==================== */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;

}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    color: var(--text);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    position: relative;
    border: 1px solid var(--border);
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    z-index: 10;
}

.modal-close:hover {
    color: white;
}

.modal-h2 {
    margin-bottom: 25px;
    color: #e1c543;
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
}

.modal-input-group {
    position: relative;
    margin-bottom: 15px;
}

.modal-input-group:last-child {
    margin-bottom: 0;
}

.modal-input-group:nth-last-child(2) {
    margin-bottom: 0;
}

.modal-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 6px;
    background: #2a2a3c;
    color: white;
    font-size: 1.5rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.modal-input:focus {
    outline: none;
    border-color: #e1c543;
    box-shadow: 0 0 0 3px rgba(225, 197, 67, 0.2);
}

.modal-input:-webkit-autofill,
.modal-input:-webkit-autofill:hover,
.modal-input:-webkit-autofill:focus,
.modal-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #2a2a3c inset !important;
    -webkit-text-fill-color: white !important;
    box-shadow: 0 0 0 1000px #2a2a3c inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Плавающая метка */
.modal-input-label {
    position: absolute;
    top: 1rem;           /* начальная позиция (внутри поля) */
    left: 1.2rem;
    color: #aaa;
    font-size: 1.5rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Когда поле в фокусе или заполнено */
.modal-input:focus + .modal-input-label,
.modal-input:not(:placeholder-shown) + .modal-input-label {
    top: -12px;         /* поднимаем наверх */
    left: 8px;
    font-size: 1.2rem;
    color: #e1c543;
    background: var(--card-bg);
    padding: 0 6px;
    border-radius: 4px;
}

/* УНИВЕРСАЛЬНАЯ КНОПКА ПРОСМОТРА ПАРОЛЯ */
.password-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 30px;
    color: #777;
    padding: 0;
    border-radius: 0;
    transition: color 0.2s ease;
    z-index: 10;
    line-height: 1;
}

.password-toggle-btn:hover {
    color: #e1c543;
}

/*.password-toggle-btn:focus {
    outline: 2px solid #e1c543;
    outline-offset: 2px;
}*/

/* При показе пароля - глаз побольше */
.password-toggle-btn.show-password {
    font-size: 30px;
}

/* При скрытии пароля - закрытый глаз поменьше */
.password-toggle-btn.hide-password {
    font-size: 30px;
}
.eye-closed {
    display: inline-block;
    line-height: 1;
}

.eye-closed::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 23px;
    height: 3px;
    background-color: currentColor; /* наследует цвет текста */
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Стили для разных контекстов */
input[type="password"] + .password-toggle-btn,
input.password-field + .password-toggle-btn {
    /* Общие стили уже заданы выше */
}

.modal-input:focus + .password-toggle-btn {
    color: #e1c543;
    background: rgba(225, 197, 67, 0.1);
}

/* Контейнер CAPTCHA */
.captcha-section img {
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--card-bg);
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 7px;
}

.captcha-container img {
    height: 40px; /* Фиксированная высота */
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--card-bg);
}

.modal-input-group-captcha {
    margin-bottom: 0px !important;
}

.modal-input-group-captcha .modal-input {
    width: 120%;
}

.modal-btn {
    display: inline-block;
    background: linear-gradient(to bottom, #8B4513, #5D4037);
    color: #e0c097;
    border: 2px solid #a0522d;
    padding: 1rem 3rem;
    font-size: 1.4rem;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.08em;
    box-shadow: 0 5px 22px rgba(160, 82, 45, 0.7);
    text-transform: uppercase;
    margin: 1rem 0;
}

.modal-btn:hover {
    background: linear-gradient(to bottom, #a0522d, #6D4C41);
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 8px 30px rgba(160, 82, 45, 0.95);
}

.modal-footer {
    display: flex;
    align-items: center;
    gap: 8px; /* расстояние между текстом и кнопкой */
    justify-content: center; /* или flex-start / flex-end по желанию */
    margin-top: 20px;
}

.modal-footer h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #ccc;
}

/* ==================== МОДАЛЬНОЕ ОКНО РЕГИСТРАЦИИ ==================== */
#reg-modal .open-forgot-btn {
    background: none;
    border: none;
    color: #6ab0f3;
    cursor: pointer;
    font-size: 1.3rem;
    text-align: right; /* выравнивание текста */
    margin: 0; /* отступ снизу */
    display: inline-block;
    text-decoration: underline;
}

#reg-modal .open-forgot-btn:hover {
    color: #4a90e2;
    text-shadow: 0 0 8px rgba(106, 176, 243, 0.3);
}

/* ==================== МОДАЛЬНОЕ ОКНО АВТОРИЗАЦИИ ==================== */
#auth-modal .auth-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* выравнивание по правому краю */
    gap: 12px;
}

#auth-modal .open-forgot-btn {
    background: none;
    border: none;
    color: #6ab0f3;
    cursor: pointer;
    font-size: 1.3rem;
    text-align: right; /* выравнивание текста */
    margin: 0; /* отступ снизу */
    display: inline-block;
    text-decoration: underline;
}

#auth-modal .open-forgot-btn:hover {
    color: #4a90e2;
    text-shadow: 0 0 8px rgba(106, 176, 243, 0.3);
}


/* ==================== МОДАЛЬНОЕ ОКНО ВОССТАНОВЛНИЯ ПАРОЛЯ ==================== */
#forgot-modal .open-forgot-btn {
    background: none;
    border: none;
    color: #6ab0f3;
    cursor: pointer;
    font-size: 1.3rem;
    text-align: right; /* выравнивание текста */
    margin: 0; /* отступ снизу */
    display: inline-block;
    text-decoration: underline;
}

#forgot-modal .open-forgot-btn:hover {
    color: #4a90e2;
    text-shadow: 0 0 8px rgba(106, 176, 243, 0.3);
}

/* ==================== МОДАЛЬНОЕ ОКНО ИЗМЕНЕНИЕ ПАРОЛЯ ==================== */

/* ==================== МОДАЛЬНОЕ ОКНО ОШИБОК ==================== */

.error-modal {
    background: var(--card-bg);
    text-align: center;
    padding: 25px;
}
.error-modal h3 {
    color: var(--error);
    margin-bottom: 15px;
    font-size: 1.5rem;
}
.error-modal p {
    margin-bottom: 20px;
    line-height: 1.5;
    font-size: 1.5rem;
    color: cadetblue;
}
.error-modal button {
    background: var(--error);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.error-modal button:hover {
    background: #c0392b;
}

/* ========== МОДАЛЬНОЕ ОКНО СКАЧИВАНИЯ ========== */

#download-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

#download-modal.active {
    opacity: 1;
    visibility: visible;
}

.download-modal {
    background: var(--card-bg);
    color: var(--text);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid var(--border);
    text-align: center;
}

.download-modal h2 {
    margin-bottom: 25px;
    color: #e1c543;
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
}

/* Информация о файле */
.download-info {
    background: rgba(50, 50, 50, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: left;
}

.download-info p {
    margin: 8px 0;
    font-size: 1.1rem;
    color: #ccc;
}

.download-info strong {
    color: #e1c543;
}

/* Кнопка скачивания */
.download-btn {
    display: inline-block;
    background: linear-gradient(to bottom, #8B4513, #5D4037);
    color: #e0c097;
    border: 2px solid #a0522d;
    padding: 16px 40px;
    font-size: 1.4rem;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.08em;
    box-shadow: 0 5px 22px rgba(160, 82, 45, 0.7);
    text-transform: uppercase;
    margin: 20px 0;
}

.download-btn:hover {
    background: linear-gradient(to bottom, #a0522d, #6D4C41);
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 8px 30px rgba(160, 82, 45, 0.95);
}

/* Дополнительная информация */
.download-notes {
    margin-top: 20px;
    font-size: 0.95rem;
    color: #777;
}

.download-notes p {
    margin: 4px 0;
}

/* Крестик закрытия */
.download-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.download-close:hover {
    color: #e1c543;
}


/* ========== МОДАЛЬНОЕ ОКНО СКАЧИВАНИЯ ========== */
.download-modal {
    max-width: 500px;
    width: 90%;
}

.download-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.download-file-info h3,
.download-platforms h3 {
    color: #e1c543;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.download-file-info p {
    margin: 8px 0;
    color: #ccc;
    font-size: 1.1rem;
}

.download-file-info strong {
    color: #e1c543;
}

/* Кнопки платформ */
.platform-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.platform-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    background: rgba(50, 50, 50, 0.8);
    border: 1px solid #444;
    border-radius: 8px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 80px;
}

.platform-btn:hover:not(.disabled) {
    background: rgba(70, 70, 70, 0.9);
    color: #e1c543;
    transform: translateY(-2px);
    border-color: #e1c543;
}

.platform-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.platform-btn svg {
    width: 24px;
    height: 24px;
}

.soon {
    font-size: 0.8rem;
    color: #777;
}


/* ========== МОДАЛЬНОЕ ОКНО ПРОФИЛЯ ========== */
.profile-modal {
    max-width: 800px;
    width: 90%;
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Колонки */
.profile-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 769px) {
    .profile-content {
        flex-direction: row;
        gap: 30px;
    }

    .profile-column-left {
        width: 35%;
    }

    .profile-column-right {
        width: 65%;
    }
}

/* Секции профиля */
.profile-section {
    background: rgba(50, 50, 50, 0.3);
    padding: 15px;
    border-radius: 8px;
    text-align: left;
}

.profile-section-title {
    display: flex;
    justify-content: space-between; /* Заголовок слева, кнопка справа */
    align-items: center;
    margin: 0 0 1.5rem 0;
}

.profile-section-title h3 {
    color: #e1c543;
    margin: 0; /* Убрали нижний отступ */
    font-size: 1.2rem;
    font-weight: bold;
}

/* Стили для маленькой кнопки редактирования */
.profile-section-title .profile-action-btn.small {
    font-size: 1.2rem;
}

/* Аватар */
.profile-avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e1c543;
    background: #333;
}

.change-avatar-btn {
    background: rgba(225, 197, 67, 0.2);
    color: #e1c543;
    border: 1px solid #e1c543;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.change-avatar-btn:hover {
    background: rgba(225, 197, 67, 0.3);
}

/* Информация о пользователе - ДВА СТОЛБЦА: слева название, справа значение */
.profile-info-grid {
    display: grid;
    grid-template-columns: auto 1fr; /* Первый столбец по содержимому, второй — занимает оставшееся пространство */
    gap: 12px 20px; /* Вертикальный и горизонтальный отступ */
    align-items: start;
}

.profile-info-item {
    display: contents; /* Элемент не создаёт свой контейнер, его дети становятся детьми grid-родителя */
}

.profile-info-item label {
    color: #e1c543;
    font-size: 1.35rem;
    text-align: right;
    padding-right: 10px;
    white-space: nowrap;
}

.profile-info-item span {
    color: #ccc;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.35rem;
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
    .profile-info-grid {
        grid-template-columns: 1fr; /* На мобильных — один столбец */
        gap: 8px;
    }

    .profile-info-item label {
        text-align: left;
        padding-right: 0;
    }

    .profile-info-item span {
        margin-left: 15px;
    }
}

/* Контейнер для значения и статуса */
.profile-value {
    color: #ccc;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Статус верификации */
.verification-status {
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
}

.verification-status.verified::after {
    content: "✓";
    color: #4CAF50;
    margin-left: 4px;
}

.verification-status.not-verified::after {
    content: "⚠️";
    color: #FF9800;
    margin-left: 4px;
}

/* Друзья */
.friends-list {
    min-height: 100px;
}

.friends-empty {
    color: #777;
    font-style: italic;
    text-align: center;
    margin: 20px 0;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #444;
}

.friend-item:last-child {
    border-bottom: none;
}

.friend-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #555;
}

.friend-name {
    color: #ccc;
    font-size: 0.95rem;
}

/* Персонажи */
.characters-list {
    min-height: 150px;
}

.characters-empty {
    color: #777;
    font-style: italic;
    text-align: center;
    margin: 20px 0;
}

.character-item {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #444;
}

.character-item:last-child {
    border-bottom: none;
}

.character-avatar {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.character-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #555;
}

.character-info {
    flex: 1;
}

.character-name {
    color: #e1c543;
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.character-class {
    color: #ccc;
    margin: 0 0 3px 0;
    font-size: 0.95rem;
}

.character-faction {
    color: #777;
    font-size: 0.9rem;
}

/* Кнопки действий */
.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

@media (min-width: 769px) {
    .profile-actions {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
    }
}

.profile-action-btn {
    background: none;
    border: none;
    color: #6ab0f3;
    cursor: pointer;
    font-size: 1.3rem;
    text-align: right;
    margin: 0;
    display: inline-block;
    text-decoration: underline;
}

.profile-action-btn:hover {
    color: #4a90e2;
    text-shadow: 0 0 8px rgba(106, 176, 243, 0.3);
}









/* ========== КОНТЕЙНЕР УВЕДОМЛЕНИЙ ========== */
.notifications-container {
    position: fixed;
    bottom: 3.5rem;
    right: 1rem;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 40px);
    transition: all 0.3s ease;
}

/* ========== УВЕДОМЛЕНИЕ ========== */
.notification {
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid #444;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    min-width: 30rem;
    max-width: 30rem;
    overflow: hidden;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 12rem;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.hiding {
    opacity: 0;
    transform: translateX(100%);
}

/* Аватар */
.notification-avatar {
    position: absolute;
    top: -25px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #e1c543;
    background: #333;
    overflow: hidden;
}

.notification-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Контент */
.notification-content {
    padding: 5px 5px 5px 10px;
    color: #e0e0e0;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.notification-title {
    color: #e1c543;
    font-weight: bold;
    font-size: 1.5rem;
}

.notification-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 2.0rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.notification-message {
    margin: 0 0 16px 0;
    line-height: 1.4;
    font-size: 1.4rem;
}

/* Кнопки */
.notification-actions {
    display: flex;
    gap: 10px;
}

.notification-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #555;
    border-radius: 6px;
    background: rgba(50, 50, 60, 0.7);
    color: #ccc;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.notification-btn:hover {
    background: rgba(70, 70, 80, 0.9);
    border-color: #666;
    color: #e1c543;
}

.notification-btn.primary {
    background: linear-gradient(to bottom, #8B4513, #5D4037);
    border-color: #a0522d;
    color: #e0c097;
}

.notification-btn.primary:hover {
    background: linear-gradient(to bottom, #a0522d, #6D4C41);
    border-color: #b0623d;
}