/* Базовые стили */
:root {
    --primary-color: #135393;
    --primary-light: #1e6bc5;
    --secondary-color: #ff9500;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg-color: #f5f7fa;
    --bg-light: #ffffff;
    --border-color: #e0e0e0;
    --error-color: #ff3b30;
    --success-color: #34c759;
    --radius: 12px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 1200px;
    min-height: 700px;
    background: var(--bg-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    position: relative;
}

/* Левая часть - информация */
.auth-info {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

.auth-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
}

.info-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.info-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 500px;
}

.features {
    margin-top: 40px;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.feature-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-text {
    flex: 1;
    font-size: 16px;
}

/* Правая часть - формы */
.auth-forms {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.forms-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.form-switcher {
    display: flex;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--border-color);
}

.form-tab {
    flex: 1;
    text-align: center;
    padding: 15px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-lighter);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.form-tab:hover {
    color: var(--text-color);
}

.form-tab.active {
    color: var(--primary-color);
}

.form-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

/* Формы */
.form {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color);
}

.form-subtitle {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 16px;
    transition: var(--transition);
    background: var(--bg-light);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(19, 83, 147, 0.1);
}

.form-input.error {
    border-color: var(--error-color);
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-lighter);
    cursor: pointer;
}

.password-toggle {
    background: none;
    border: none;
    color: var(--text-lighter);
    cursor: pointer;
    padding: 0;
    font-size: 18px;
}

.error-message {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--border-color);
    cursor: pointer;
}

.checkbox-group label {
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.forgot-link:hover {
    text-decoration: underline;
}

.auth-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 20px;
}

.auth-button:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1557a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(19, 83, 147, 0.3);
}

.auth-button:active {
    transform: translateY(0);
}

.social-divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: var(--text-lighter);
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.social-divider span {
    padding: 0 15px;
    font-size: 14px;
}

.social-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.social-button {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-light);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-button:hover {
    border-color: var(--primary-color);
    background: rgba(19, 83, 147, 0.05);
}

.social-button.google i {
    color: #DB4437;
}

.social-button.yandex i {
    color: #FFCC00;
}

.social-button.github i {
    color: #333;
}

.form-footer {
    text-align: center;
    margin-top: 30px;
    color: var(--text-light);
    font-size: 15px;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.form-footer a:hover {
    text-decoration: underline;
}

.terms {
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-lighter);
    text-align: center;
}

.terms a {
    color: var(--primary-color);
    text-decoration: none;
}

.terms a:hover {
    text-decoration: underline;
}

/* Анимация смены форм */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form.slide-in {
    animation: slideIn 0.3s ease;
}

/* Уведомления */
.notification {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background-color: rgba(52, 199, 89, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.notification.error {
    background-color: rgba(255, 59, 48, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.notification.info {
    background-color: rgba(19, 83, 147, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(19, 83, 147, 0.2);
}

.auth-form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 100px;
}

/* Адаптивность */
@media (max-width: 992px) {
    .auth-container {
        flex-direction: column;
        min-height: auto;
        max-width: 600px;
    }

    .auth-form-container {
        margin: 50px;
    }

    .auth-info {
        padding: 40px 30px;
    }

    .auth-forms {
        padding: 40px 30px;
    }

    .info-title {
        font-size: 28px;
    }
}

@media (max-width: 576px) {
    .auth-info,
    .auth-forms {
        padding: 30px 20px;
    }

    .auth-form-container {
        margin: 15px;
    }

    .logo {
        margin-bottom: 30px;
    }

    .form-title {
        font-size: 24px;
    }

    .social-buttons {
        grid-template-columns: 1fr;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* Дополнительные стили */
.progress-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success-color);
    width: 0%;
    transition: width 0.3s ease;
}

.password-strength {
    font-size: 12px;
    color: var(--text-lighter);
    margin-top: 5px;
}

.password-strength.weak {
    color: var(--error-color);
}

.password-strength.medium {
    color: var(--secondary-color);
}

.password-strength.strong {
    color: var(--success-color);
}

.verification-note {
    background: rgba(19, 83, 147, 0.05);
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    font-size: 14px;
}

/* Загрузка */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}