/* ============================================
   🔐 Password Reset Styles
   ============================================ */

/* Кнопка "Забыли пароль?" на странице логина */
.forgot-password-wrapper {
    margin-top: 20px;
    text-align: center;
}

.forgot-password-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #a78bfa;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
}

.forgot-password-link:hover {
    color: #c4b5fd;
    background: rgba(167, 139, 250, 0.1);
    transform: translateY(-2px);
}

.forgot-password-link i {
    font-size: 16px;
}

/* Кнопка "Назад" */
.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #a78bfa;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 12px;
    background: rgba(167, 139, 250, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(167, 139, 250, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.back-button:hover {
    background: rgba(167, 139, 250, 0.2);
    transform: translateX(-5px);
    border-color: rgba(167, 139, 250, 0.4);
}

.back-button i {
    transition: transform 0.3s ease;
}

.back-button:hover i {
    transform: translateX(-3px);
}

/* Заголовки страниц */
.page-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    margin: 15px 0 10px;
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.5);
}

.page-subtitle {
    font-family: 'Exo 2', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Информационный блок */
.info-box {
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-box i {
    color: #a78bfa;
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.info-box p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

/* Индикатор силы пароля */
.password-strength {
    margin-top: 10px;
    margin-bottom: 20px;
}

.strength-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981);
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 2px;
}

.strength-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    text-align: center;
}

/* Состояния силы пароля */
.password-strength.weak .strength-fill {
    width: 33%;
    background: #ef4444;
}

.password-strength.weak .strength-text {
    color: #ef4444;
}

.password-strength.medium .strength-fill {
    width: 66%;
    background: #f59e0b;
}

.password-strength.medium .strength-text {
    color: #f59e0b;
}

.password-strength.strong .strength-fill {
    width: 100%;
    background: #10b981;
}

.password-strength.strong .strength-text {
    color: #10b981;
}

/* Кнопка показа/скрытия пароля */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    transition: color 0.3s ease;
    z-index: 2;
}

.toggle-password:hover {
    color: #a78bfa;
}

.toggle-password.active {
    color: #a78bfa;
}

/* Адаптация input-wrapper для кнопки показа пароля */
.input-wrapper {
    position: relative;
}

.input-wrapper .form-start__input {
    padding-right: 45px;
}

/* Flash сообщения с автоскрытием */
.flash-messages {
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flash-message {
    animation: fadeOut 0.5s ease 4.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Успешное сообщение с редиректом */
.flash-success-redirect {
    position: relative;
    overflow: hidden;
}

.flash-success-redirect::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #059669);
    animation: progressBar 3s linear forwards;
}

@keyframes progressBar {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .back-button {
        top: 10px;
        left: 10px;
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .page-subtitle {
        font-size: 13px;
    }
    
    .info-box {
        padding: 12px;
        font-size: 12px;
    }
    
    .info-box i {
        font-size: 18px;
    }
}

/* Темная тема для email */
@media (prefers-color-scheme: dark) {
    .info-box {
        background: rgba(167, 139, 250, 0.15);
        border-color: rgba(167, 139, 250, 0.4);
    }
}

/* Анимация для кнопки отправки */
.form-start__button-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.form-start__button-submit.loading .btn-text::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}
