﻿/* wwwroot/css/auth.css */
/* Стили только для страниц входа и регистрации */

:root {
    --primary: #4361ee;
    --primary-dark: #3451d1;
    --primary-light: #eef2ff;
    --danger: #ef4444;
    --dark: #1e293b;
    --text: #334155;
    --text-light: #64748b;
    --border: #e2e8f0;
    --white: #ffffff;
}

/* Основной контейнер */
.auth-wrapper {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 2;
}

/* Карточка */
.auth-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 32px;
    padding: 48px 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

    .auth-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--primary), #764ba2);
    }

/* Бренд */
.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -1px;
    transition: color 0.2s ease;
    display: inline-block;
}

    .auth-logo:hover {
        color: var(--primary-dark);
        transform: scale(1.02);
    }

/* Заголовки */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.2;
}

.auth-subtitle {
    color: var(--text-light);
    font-size: 16px;
}

/* Форма */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-left: 4px;
}

/* Поля ввода */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--white);
}

    .form-input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
    }

    .form-input::placeholder {
        color: var(--text-light);
        opacity: 0.5;
    }

/* Валидация */
.validation-message {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
    animation: shake 0.3s ease;
}

.validation-summary {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 14px;
    margin-bottom: 16px;
    animation: shake 0.3s ease;
}

    .validation-summary ul {
        margin: 0;
        padding-left: 20px;
    }

/* Опции формы */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding: 8px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text);
    user-select: none;
}

    .checkbox-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
        accent-color: var(--primary);
    }

.forgot-link {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
}

    .forgot-link:hover {
        color: var(--primary);
        text-decoration: underline;
    }

/* Кнопка отправки */
.btn-submit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 16px 28px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
    width: 100%;
}

    .btn-submit::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s ease;
    }

    .btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 20px 30px -10px rgba(67, 97, 238, 0.4);
    }

        .btn-submit:hover::before {
            left: 100%;
        }

    .btn-submit:active {
        transform: translateY(0);
    }

/* Разделитель */
.auth-divider {
    text-align: center;
    margin: 32px 0 24px;
    position: relative;
}

    .auth-divider::before,
    .auth-divider::after {
        content: '';
        position: absolute;
        top: 50%;
        width: calc(50% - 30px);
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--border), transparent);
    }

    .auth-divider::before {
        left: 0;
    }

    .auth-divider::after {
        right: 0;
    }

    .auth-divider span {
        background: white;
        padding: 0 16px;
        color: var(--text-light);
        font-size: 14px;
        font-weight: 500;
    }

/* Футер */
.auth-footer {
    text-align: center;
}

.register-prompt {
    color: var(--text-light);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.register-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

    .register-link:hover {
        color: var(--primary-dark);
        gap: 8px;
        text-decoration: underline;
    }

/* Декоративные элементы */
.auth-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3), transparent 70%);
    animation: float 10s infinite ease-in-out;
}

.circle-1 {
    width: 400px;
    height: 400px;
    top: -200px;
    right: -200px;
    background: rgba(255, 255, 255, 0.1);
    animation-delay: 0s;
}

.circle-2 {
    width: 300px;
    height: 300px;
    bottom: -150px;
    left: -150px;
    background: rgba(255, 255, 255, 0.08);
    animation-delay: 2s;
}

.circle-3 {
    width: 200px;
    height: 200px;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.05);
    animation-delay: 4s;
}

/* Анимации */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .auth-card {
        padding: 32px 24px;
    }

    .auth-title {
        font-size: 28px;
    }

    .auth-logo {
        font-size: 32px;
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .register-prompt {
        flex-direction: column;
        gap: 12px;
    }

    .circle-1 {
        width: 300px;
        height: 300px;
    }

    .circle-2 {
        width: 200px;
        height: 200px;
    }

    .btn-submit {
        padding: 14px 24px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 20px;
    }

    .auth-title {
        font-size: 24px;
    }

    .form-input {
        padding: 12px 16px;
        font-size: 15px;
    }
}
