/* Стили для страниц авторизации и регистрации */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --secondary-dark: #27ae60;
    --accent-color: #e74c3c;
    --dark-color: #1a1a2e;
    --darker-color: #16213e;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --border-color: #2d3748;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --radius: 12px;
    --transition: all 0.3s ease;
}

.auth-body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--darker-color) 100%);
    color: var(--light-color);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

.auth-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(52, 152, 219, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(46, 204, 113, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(231, 76, 60, 0.05) 0%, transparent 50%);
    z-index: -1;
}

.auth-container {
    background: rgba(22, 33, 62, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.6s ease forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.auth-logo:hover {
    transform: scale(1.05);
}

.auth-logo i {
    color: var(--secondary-color);
}

.auth-logo-highlight {
    color: var(--secondary-color);
}

.auth-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: white;
    font-weight: 600;
}

.auth-subtitle {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Сообщения */
.auth-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid;
}

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

.alert-success {
    background: rgba(46, 204, 113, 0.1);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    border-color: var(--accent-color);
    color: #f8d7da;
}

.alert-error ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.alert-error li {
    margin-bottom: 4px;
}

/* Форма */
.auth-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label i {
    color: var(--primary-color);
    width: 16px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-input::placeholder {
    color: #64748b;
}

.form-hint {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Кнопка */
.auth-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.auth-button::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;
}

.auth-button:hover::before {
    left: 100%;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

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

.auth-button i {
    font-size: 1.1rem;
}

/* Ссылки */
.auth-links {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    padding: 8px 12px;
    border-radius: 6px;
}

.auth-link:hover {
    background: rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.auth-link i {
    font-size: 0.9rem;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #64748b;
    font-size: 0.9rem;
}

.home-link {
    color: #94a3b8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    padding: 8px 12px;
    border-radius: 6px;
}

.home-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

/* Иконки ввода */
.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

.input-with-icon .form-input {
    padding-left: 48px;
}

/* Переключатель видимости пароля */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* Progress bar для пароля */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.strength-weak { 
    background: #e74c3c; 
    width: 25%; 
}

.strength-medium { 
    background: #f39c12; 
    width: 50%; 
}

.strength-good { 
    background: #3498db; 
    width: 75%; 
}

.strength-strong { 
    background: #2ecc71; 
    width: 100%; 
}

/* Анимация успешной регистрации */
.success-animation {
    text-align: center;
    padding: 40px 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: white;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Адаптивность */
@media (max-width: 480px) {
    .auth-container {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-logo {
        font-size: 1.6rem;
    }
}

/* Анимация фона */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 15s infinite linear;
}

.shape:nth-child(1) {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 200px;
    height: 200px;
    background: var(--secondary-color);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.shape:nth-child(3) {
    width: 150px;
    height: 150px;
    background: var(--accent-color);
    top: 50%;
    right: -75px;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}
