/* ========== СТРАНИЦА ВХОДА ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1100px;
    min-height: 600px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 140, 66, 0.3);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s, transform 0.6s;
}

.login-container.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Левая часть с порталом */
.login-portal {
    flex: 1;
    background: linear-gradient(135deg,
    rgba(255, 140, 66, 0.2),
    rgba(58, 110, 165, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.login-portal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--orange-glow) 0%, transparent 70%);
    opacity: 0.3;
    animation: rotateBg 20s linear infinite;
}

@keyframes rotateBg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.portal-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.portal-circle {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    background: radial-gradient(circle at 30% 30%,
    var(--orange-primary),
    var(--orange-dark),
    var(--blue-primary));
    border-radius: 50%;
    animation: portalPulse 3s infinite alternate;
    box-shadow: 0 0 60px var(--orange-glow);
}

@keyframes portalPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 60px var(--orange-glow);
    }
    100% {
        transform: scale(1.1);
        box-shadow: 0 0 100px var(--orange-glow);
    }
}

.portal-runes {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 32px;
    color: var(--orange-primary);
    opacity: 0.8;
}

.portal-runes span {
    animation: runeFloat 2s infinite alternate;
}

.portal-runes span:nth-child(2) { animation-delay: -0.3s; }
.portal-runes span:nth-child(3) { animation-delay: -0.6s; }
.portal-runes span:nth-child(4) { animation-delay: -0.9s; }
.portal-runes span:nth-child(5) { animation-delay: -1.2s; }

@keyframes runeFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.5;
    }
    100% {
        transform: translateY(-10px) scale(1.2);
        opacity: 1;
    }
}

.portal-title {
    font-size: 42px;
    font-weight: 800;
    color: white;
    text-shadow: 0 0 20px var(--orange-primary);
    margin-bottom: 15px;
}

.portal-description {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto;
}

/* Правая часть с формой */
.login-form-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--dark-bg);
}

.login-form-wrapper {
    width: 100%;
    max-width: 350px;
}

.form-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-primary);
    text-align: center;
}

/* Уведомления */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    color: #ff8a80;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4caf50;
    color: #81c784;
}

.alert-icon {
    font-size: 18px;
}

/* Форма */
.login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

/* ========== СТИЛИЗОВАННЫЕ МЕТКИ ========== */

/* Контейнер для метки с иконкой */
.form-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--orange-light);
    font-size: 16px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    text-shadow: 0 0 10px var(--orange-glow);
    position: relative;
    padding-left: 10px;
}

/* Декоративная линия слева */
.form-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 70%;
    background: var(--gradient-orange);
    border-radius: 3px;
    box-shadow: 0 0 10px var(--orange-primary);
}

/* Иконка в метке */
.label-icon {
    font-size: 20px;
    filter: drop-shadow(0 0 5px var(--orange-primary));
    margin-left: 5px;
}

/* Стиль для подсказок */
.form-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    padding-left: 15px;
    border-left: 1px dashed rgba(255, 140, 66, 0.3);
}

/* Стиль для чекбокса с правилами */
.terms-group {
    margin: 25px 0;
    padding: 15px;
    background: rgba(255, 140, 66, 0.05);
    border: 1px solid rgba(255, 140, 66, 0.2);
    border-radius: var(--border-radius-md);
    transition: all 0.3s;
}

.terms-group:hover {
    background: rgba(255, 140, 66, 0.1);
    border-color: var(--orange-primary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
}

.checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--orange-primary);
}

.terms-link {
    color: var(--orange-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.terms-link:hover {
    color: var(--orange-primary);
    text-decoration: underline;
    text-shadow: 0 0 5px var(--orange-glow);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 140, 66, 0.2);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--orange-primary);
    box-shadow: var(--shadow-orange);
}

.form-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Опции формы */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
}

.checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--orange-primary);
}

.forgot-link {
    color: var(--blue-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--orange-primary);
}

/* Кнопка входа */
.btn-login {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-bottom: 20px;
}

/* Разделитель */
.login-divider {
    position: relative;
    text-align: center;
    margin: 25px 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background: rgba(255, 140, 66, 0.2);
}

.login-divider::before {
    left: 0;
}

.login-divider::after {
    right: 0;
}

.divider-text {
    background: var(--dark-bg);
    padding: 0 15px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Регистрация */
.register-section {
    text-align: center;
    margin-bottom: 25px;
}

.register-text {
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 14px;
}

.btn-register {
    width: 100%;
    padding: 12px;
}

/* Магическая подпись */
.login-signature {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
    position: relative;
}

.login-signature::before,
.login-signature::after {
    content: '✦';
    color: var(--orange-primary);
    margin: 0 8px;
    font-size: 10px;
}

/* Адаптация */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        max-width: 450px;
    }

    .login-portal {
        padding: 30px;
    }

    .portal-circle {
        width: 150px;
        height: 150px;
    }

    .portal-title {
        font-size: 32px;
    }

    .portal-description {
        font-size: 14px;
    }

    .form-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 10px;
    }

    .login-form-container {
        padding: 25px;
    }

    .form-options {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* ========== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ РЕГИСТРАЦИИ ========== */

/* Стиль для подсказок */
.form-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    padding-left: 15px;
    border-left: 1px dashed rgba(255, 140, 66, 0.3);
}

/* Стиль для чекбокса с правилами */
.terms-group {
    margin: 25px 0;
    padding: 15px;
    background: rgba(255, 140, 66, 0.05);
    border: 1px solid rgba(255, 140, 66, 0.2);
    border-radius: var(--border-radius-md);
    transition: all 0.3s;
}

.terms-group:hover {
    background: rgba(255, 140, 66, 0.1);
    border-color: var(--orange-primary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
}

.checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--orange-primary);
}

.terms-link {
    color: var(--orange-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.terms-link:hover {
    color: var(--orange-primary);
    text-decoration: underline;
    text-shadow: 0 0 5px var(--orange-glow);
}
/* Адаптация для мобилок */
@media (max-width: 480px) {
    .form-hint {
        font-size: 10px;
    }

    .checkbox-label {
        align-items: flex-start;
    }

    .checkbox-text {
        font-size: 13px;
        line-height: 1.4;
    }
}

/* ========== СТРАНИЦА ВОССТАНОВЛЕНИЯ ========== */

/* Кнопки в ряду */
.forgot-links {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.btn-forgot {
    flex: 1;
    justify-content: center;
    padding: 12px;
}

/* Анимация для портала на этой странице */
.portal-circle {
    animation: portalPulse 3s infinite alternate, portalColor 10s infinite;
}

@keyframes portalColor {
    0%, 100% {
        background: radial-gradient(circle at 30% 30%,
        var(--orange-primary),
        var(--orange-dark),
        var(--blue-primary));
    }
    50% {
        background: radial-gradient(circle at 70% 70%,
        var(--blue-primary),
        var(--orange-dark),
        var(--orange-primary));
    }
}

/* Адаптация */
@media (max-width: 480px) {
    .forgot-links {
        flex-direction: column;
        gap: 10px;
    }

    .btn-forgot {
        width: 100%;
    }
}