/* ====================================================================
   AXOID - ПРЕМИУМ ЧЕРНО-БЕЛАЯ ТЕМА С АНИМАЦИЯМИ
   ==================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Переменные цветов */
:root {
    --bg-color: #000000;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.12);
    --input-focus-border: #FFFFFF;
    --input-icon-color: rgba(255, 255, 255, 0.4);

    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --link-color: rgba(255, 255, 255, 0.8);
    --accent-color: #FFFFFF;
    --accent-hover: rgba(255, 255, 255, 0.9);
    --accent-text-color: #000000;

    --error-color: #FF4444;
    --error-bg: rgba(255, 68, 68, 0.1);
    --success-color: #00FF88;
    --success-bg: rgba(0, 255, 136, 0.1);

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --border-radius-main: 24px;
    --border-radius-input: 16px;
    --border-radius-button: 12px;
}

/* Глобальные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-image:
        radial-gradient(circle at top left, rgba(50, 50, 50, 0.3) 0%, rgba(0, 0, 0, 0.95) 70%),
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        var(--auth-bg-image, url('auth-th1-wh.webp'));
    background-repeat: no-repeat;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Анимированный фоновый эффект */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    animation: bgPulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hidden { 
    display: none !important; 
}

/* ====================================================================
   NAVBAR - Минималистичная навигация
   ==================================================================== */

.navbar { 
    width: 100%; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 2rem 2.5rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-sizing: border-box; 
    position: relative; 
    z-index: 10;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-logo { 
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
    text-decoration: none; 
    transition: all 0.3s ease;
    position: relative;
}

.nav-logo:hover { 
    transform: translateX(5px);
}

.nav-logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, white, transparent);
    transition: width 0.3s ease;
}

.nav-logo:hover::after {
    width: 100%;
}

.nav-logo img { 
    height: 36px; 
    width: auto; 
    display: block;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    transition: filter 0.3s ease;
}

.nav-logo:hover img {
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
}

.nav-logo span { 
    font-family: var(--font-family); 
    font-size: 1.4rem; 
    font-weight: 800; 
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.nav-links a { 
    font-size: 0.95rem; 
    font-weight: 500; 
    color: var(--text-secondary); 
    margin-left: 2rem; 
    text-decoration: none; 
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.nav-links a:hover { 
    color: var(--text-primary); 
}

.nav-links a:hover::before {
    width: 100%;
}

/* ====================================================================
   AUTH WRAPPER - Контейнер формы с анимацией
   ==================================================================== */

.auth-wrapper { 
    flex-grow: 1; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    padding: 2rem 1rem; 
    position: relative; 
    z-index: 5; 
    width: 100%; 
    box-sizing: border-box;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================================================
   GLASS FORM - Стеклянная форма с новым дизайном
   ==================================================================== */

.glass-form { 
    width: 100%; 
    max-width: 440px; 
    background: var(--glass-bg); 
    border: 1px solid var(--glass-border); 
    border-radius: var(--border-radius-main); 
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 8px 16px rgba(255, 255, 255, 0.02) inset;
    backdrop-filter: blur(40px); 
    -webkit-backdrop-filter: blur(40px); 
    padding: 3rem; 
    box-sizing: border-box; 
    position: relative; 
    overflow: hidden;
    animation: formAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes formAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Светящийся эффект по краям формы */
.glass-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ====================================================================
   FORM CONTAINERS - Контейнеры форм
   ==================================================================== */

.form-container { 
    width: 100%; 
    box-sizing: border-box; 
    animation: formSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes formSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-container.hidden { 
    display: none !important;
}

.form-container.active { 
    display: block !important;
}

/* ====================================================================
   FORM TITLE - Заголовок с анимацией
   ==================================================================== */

.form-title { 
    font-family: var(--font-family); 
    font-weight: 800; 
    font-size: 2.2rem; 
    text-align: center; 
    margin-top: 0; 
    margin-bottom: 2.5rem; 
    color: var(--text-primary);
    letter-spacing: -1px;
    background: linear-gradient(135deg, #FFFFFF 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 2s ease-in-out infinite;
    position: relative;
}

@keyframes titleGlow {
    0%, 100% { 
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
    }
    50% { 
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
    }
}

/* ====================================================================
   REGISTRATION PROGRESS - Прогресс регистрации
   ==================================================================== */

.registration-progress {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
    gap: 0.75rem;
    position: relative;
}

.registration-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
    z-index: 0;
}

.progress-step {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 1;
    border: 2px solid var(--bg-color);
}

.progress-step.active {
    background: var(--text-primary);
    transform: scale(1.4);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

/* ====================================================================
   INPUT GROUPS - Поля ввода с новым дизайном
   ==================================================================== */

.input-group { 
    position: relative; 
    margin-bottom: 1.5rem;
    animation: inputSlideIn 0.5s ease-out backwards;
}

.input-group:nth-child(1) { animation-delay: 0.1s; }
.input-group:nth-child(2) { animation-delay: 0.2s; }
.input-group:nth-child(3) { animation-delay: 0.3s; }
.input-group:nth-child(4) { animation-delay: 0.4s; }

@keyframes inputSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-icon { 
    position: absolute; 
    top: 50%; 
    left: 18px; 
    transform: translateY(-50%); 
    color: var(--input-icon-color); 
    font-size: 1.2rem; 
    pointer-events: none; 
    transition: all 0.3s ease; 
    z-index: 1; 
}

.input-group input { 
    width: 100%; 
    padding: 16px 20px 16px 52px; 
    border-radius: var(--border-radius-input); 
    border: 1.5px solid var(--input-border); 
    background-color: var(--input-bg); 
    color: var(--text-primary); 
    font-size: 1rem; 
    box-sizing: border-box; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); 
    outline: none; 
    position: relative; 
    z-index: 0; 
    font-family: var(--font-family);
    font-weight: 500;
}

.input-group input::placeholder { 
    color: var(--text-secondary); 
    opacity: 1;
    font-weight: 400;
}

.input-group input:focus { 
    border-color: var(--input-focus-border); 
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 0 0 3px rgba(255, 255, 255, 0.1),
        0 8px 24px rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.input-group input:focus ~ .input-icon { 
    color: var(--input-focus-border);
    transform: translateY(-50%) scale(1.1);
}

.input-group.input-error input { 
    border-color: var(--error-color); 
    box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.2); 
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.input-group.input-error .input-icon { 
    color: var(--error-color); 
}

.input-icon.password-toggle { 
    left: auto; 
    right: 18px; 
    cursor: pointer; 
    pointer-events: auto; 
    z-index: 1;
    font-size: 1.3rem;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.input-icon.password-toggle:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* ====================================================================
   VERIFICATION CODE INPUT - Раздельный ввод кода (НОВОЕ!)
   ==================================================================== */

.code-input-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 2rem 0;
    animation: codeInputAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes codeInputAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.code-digit {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    border: 2px solid var(--input-border);
    border-radius: 12px;
    background: var(--input-bg);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', monospace;
    caret-color: white;
}

.code-digit:focus {
    border-color: var(--input-focus-border);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 0 0 3px rgba(255, 255, 255, 0.15),
        0 8px 24px rgba(255, 255, 255, 0.1);
    transform: translateY(-3px) scale(1.05);
}

.code-digit.filled {
    border-color: var(--success-color);
    background: rgba(0, 255, 136, 0.05);
    animation: digitFilled 0.3s ease;
}

@keyframes digitFilled {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.code-digit.error {
    border-color: var(--error-color);
    background: var(--error-bg);
    animation: shake 0.5s ease;
}

/* Скрываем старый инпут для кода */
.verification-input {
    display: none !important;
}

/* ====================================================================
   OPTIONS ROW - Чекбоксы и ссылки
   ==================================================================== */

.options-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 2rem; 
    font-size: 0.9rem;
    animation: inputSlideIn 0.5s ease-out backwards;
    animation-delay: 0.5s;
}

.checkbox-label { 
    display: flex; 
    align-items: center; 
    gap: 0.6rem; 
    color: var(--text-secondary); 
    cursor: pointer; 
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.checkbox-label:hover {
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] { 
    appearance: none; 
    -webkit-appearance: none; 
    width: 18px; 
    height: 18px; 
    background-color: var(--input-bg); 
    border: 2px solid var(--input-border); 
    border-radius: 4px; 
    cursor: pointer; 
    position: relative; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:hover {
    border-color: var(--input-focus-border);
    background-color: rgba(255, 255, 255, 0.08);
}

.checkbox-label input[type="checkbox"]:checked { 
    background-color: var(--accent-color); 
    border-color: var(--accent-color);
    transform: scale(1.1);
}

.checkbox-label input[type="checkbox"]:checked::after { 
    content: '✓'; 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    color: var(--accent-text-color); 
    font-size: 12px; 
    font-weight: 700;
    animation: checkPop 0.3s ease;
}

@keyframes checkPop {
    0% { transform: translate(-50%, -50%) scale(0); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.forgot-password {
    font-size: 0.9rem;
    color: var(--link-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-password::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: white;
    transition: width 0.3s ease;
}

.forgot-password:hover {
    color: var(--text-primary);
}

.forgot-password:hover::after {
    width: 100%;
}

/* ====================================================================
   BUTTONS - Кнопки с новыми эффектами
   ==================================================================== */

.submit-btn { 
    width: 100%; 
    padding: 16px 24px; 
    background: var(--accent-color); 
    color: var(--accent-text-color); 
    border: none; 
    border-radius: var(--border-radius-button); 
    font-size: 1rem; 
    font-weight: 700; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); 
    font-family: var(--font-family);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.submit-btn:hover { 
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(255, 255, 255, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-text,
.btn-loading {
    position: relative;
    z-index: 1;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: var(--accent-text-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ====================================================================
   DIVIDER - Разделитель
   ==================================================================== */

.divider { 
    text-align: center; 
    margin: 2rem 0; 
    color: var(--text-secondary); 
    font-size: 0.85rem;
    position: relative;
    font-weight: 500;
}

.divider::before,
.divider::after { 
    content: ''; 
    position: absolute; 
    top: 50%; 
    width: 40%; 
    height: 1px; 
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

/* ====================================================================
   SOCIAL BUTTONS - Социальные кнопки
   ==================================================================== */

.social-login { 
    display: flex; 
    gap: 1rem; 
    margin-bottom: 2rem;
    animation: inputSlideIn 0.5s ease-out backwards;
    animation-delay: 0.6s;
}

.social-btn { 
    flex: 1; 
    padding: 14px 20px; 
    background: var(--input-bg); 
    border: 1.5px solid var(--input-border); 
    color: var(--text-primary); 
    border-radius: var(--border-radius-button); 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); 
    font-size: 0.9rem; 
    font-weight: 600;
    font-family: var(--font-family);
}

.social-btn:not(:disabled):hover { 
    background: rgba(255, 255, 255, 0.1); 
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.social-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ====================================================================
   SWITCH LINK - Переключение форм
   ==================================================================== */

.switch-link { 
    text-align: center; 
    color: var(--text-secondary); 
    font-size: 0.9rem;
    margin-top: 2rem;
}

.switch-link a { 
    color: var(--text-primary); 
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.switch-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: white;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.switch-link a:hover::after {
    transform: scaleX(1);
}

/* ====================================================================
   FORM FEEDBACK - Уведомления
   ==================================================================== */

.form-feedback { 
    padding: 14px 18px; 
    border-radius: 12px; 
    margin-bottom: 1.5rem; 
    font-size: 0.9rem;
    display: none;
    font-weight: 500;
    animation: feedbackSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes feedbackSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-feedback.error { 
    background: var(--error-bg); 
    color: var(--error-color);
    border: 1px solid rgba(255, 68, 68, 0.3);
    display: block;
}

.form-feedback.success { 
    background: var(--success-bg); 
    color: var(--success-color);
    border: 1px solid rgba(0, 255, 136, 0.3);
    display: block;
}

/* ====================================================================
   VERIFICATION SCREEN - Экран подтверждения
   ==================================================================== */

.verification-info {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.6s ease-out;
}

.verification-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    }
    50% { 
        transform: scale(1.05);
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
    }
}

.verification-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.verification-email {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.verification-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.resend-btn {
    background: none;
    border: 1.5px solid var(--input-border);
    color: var(--text-secondary);
    padding: 12px 20px;
    border-radius: var(--border-radius-button);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-family);
}

.resend-btn:hover {
    background: var(--input-bg);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-weight: 500;
}

.back-btn:hover {
    color: var(--text-primary);
    transform: translateX(-5px);
}

/* ====================================================================
   SUCCESS MESSAGE - Сообщение успеха
   ==================================================================== */

.success-message {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: successAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes successAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--success-color), #00CC70);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.4));
    }
    50% { 
        transform: scale(1.1);
        filter: drop-shadow(0 0 30px rgba(0, 255, 136, 0.6));
    }
}

.success-message p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* ====================================================================
   AVATAR SELECTION - Выбор аватара
   ==================================================================== */

.input-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.input-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    display: block;
}

.avatar-selection {
    margin-bottom: 2rem;
}

.custom-avatar-upload {
    margin-top: 1rem;
}

.upload-area {
    border: 2px dashed var(--input-border);
    border-radius: var(--border-radius-input);
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--input-bg);
}

.upload-area:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.upload-area.drag-over {
    border-color: var(--input-focus-border);
    background: rgba(255, 255, 255, 0.1);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: iconFloat 2s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.upload-area p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.avatar-preview {
    margin-top: 1.5rem;
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

.avatar-preview img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--input-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.avatar-preview img:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.remove-avatar {
    background: var(--error-bg);
    border: 1px solid var(--error-color);
    color: var(--error-color);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 1rem;
    font-family: var(--font-family);
    font-weight: 600;
    transition: all 0.3s ease;
}

.remove-avatar:hover {
    background: rgba(255, 68, 68, 0.2);
    transform: translateY(-2px);
}

/* ====================================================================
   2FA SCREEN - Экран двухфакторной аутентификации
   ==================================================================== */

.twofa-info {
    text-align: center;
    margin-bottom: 2rem;
}

.twofa-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: iconPulse 2s ease-in-out infinite;
}

/* ====================================================================
   ALREADY LOGGED - Экран "уже вошли"
   ==================================================================== */

.already-logged-container {
    text-align: center;
    padding: 2rem;
}

.logged-user-info {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.logged-user-info strong {
    color: var(--text-primary);
    font-weight: 700;
}

.logout-btn {
    background: none;
    border: 1.5px solid var(--error-color);
    color: var(--error-color);
    padding: 14px 28px;
    border-radius: var(--border-radius-button);
    cursor: pointer;
    font-size: 0.95rem;
    margin-top: 1rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-family);
    font-weight: 600;
    width: 100%;
}

.logout-btn:hover {
    background: var(--error-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.2);
}

/* ====================================================================
   AVATAR EDITOR - Редактор аватара
   ==================================================================== */

.editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.editor-overlay.active {
    display: flex;
}

.editor-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-main);
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: formAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.editor-container h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
    font-weight: 700;
}

.editor-preview {
    width: 300px;
    height: 300px;
    margin: 0 auto 2rem;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.5);
}

.editor-image {
    position: absolute;
    max-width: none;
}

.crop-overlay {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    cursor: move;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.editor-controls {
    margin-bottom: 2rem;
}

.editor-controls label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.editor-controls input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--input-bg);
    outline: none;
    -webkit-appearance: none;
}

.editor-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editor-controls input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.editor-actions {
    display: flex;
    gap: 1rem;
}

.save-avatar,
.cancel-edit {
    flex: 1;
    padding: 14px 20px;
    border-radius: var(--border-radius-button);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-family);
    border: none;
}

.save-avatar {
    background: white;
    color: black;
}

.save-avatar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

.cancel-edit {
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1.5px solid var(--input-border);
}

.cancel-edit:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ====================================================================
   NAV USER MENU - Меню пользователя в навбаре
   ==================================================================== */

.nav-user-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    padding: 4px;
    cursor: pointer;
}

.nav-user-link:hover {
    transform: translateX(5px);
}

.nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.nav-user-link:hover .nav-user-avatar {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.nav-user-menu {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 120%;
    right: 0;
    min-width: 180px;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    z-index: 100;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-user-menu:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    padding-left: 1.5rem;
}

/* ====================================================================
   AXOPLUS AVATAR BORDER - Анимированная рамка для Axo Plus
   ==================================================================== */

.avatar-plus {
    position: relative;
    border: none !important;
    border-radius: 50%;
}

.avatar-plus::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #f008c3, #9100ff, #00bfff, #00ff8f, #f008c3);
    background-size: 400% 400%;
    border-radius: 50%;
    z-index: -1;
    animation: gradient-spin 3s linear infinite;
}

@keyframes gradient-spin {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ====================================================================
   RESPONSIVE - Адаптация под мобильные
   ==================================================================== */

@media (max-width: 768px) {
    .navbar {
        padding: 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .glass-form {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }

    .form-title {
        font-size: 1.8rem;
    }

    .code-digit {
        width: 44px;
        height: 52px;
        font-size: 1.5rem;
    }

    .code-input-container {
        gap: 8px;
    }

    .input-group input {
        padding: 14px 18px 14px 48px;
    }

    .submit-btn {
        padding: 14px 20px;
    }

    .editor-container {
        padding: 2rem 1.5rem;
    }

    .editor-preview {
        width: 250px;
        height: 250px;
    }

    .crop-overlay {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .glass-form {
        padding: 1.5rem 1rem;
    }

    .form-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .code-digit {
        width: 40px;
        height: 48px;
        font-size: 1.3rem;
    }

    .code-input-container {
        gap: 6px;
    }

    .social-login {
        flex-direction: column;
    }

    .verification-icon,
    .success-icon {
        font-size: 3rem;
    }

    .avatar-preview img {
        width: 100px;
        height: 100px;
    }
}

/* ====================================================================
   REGISTRATION STEPS - Шаги регистрации
   ==================================================================== */

.registration-step {
    animation: stepSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes stepSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.registration-step.hidden {
    display: none !important;
}

/* ====================================================================
   УТИЛИТЫ
   ==================================================================== */

/* Плавное появление элементов */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Скрытие элементов */
.hidden {
    display: none !important;
}

/* Текст с градиентом */
.gradient-text {
    background: linear-gradient(135deg, #FFFFFF 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ====================================================================
   FOOTER - Подвал страницы
   ==================================================================== */

.page-footer {
    width: 100%;
    padding: 2rem 0;
    text-align: center;
    position: relative;
    z-index: 10;
    /* Легкая граница сверху (опционально) */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.page-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.page-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    margin: 0 12px;
    position: relative;
    transition: color 0.3s ease;
}

.page-footer a:hover {
    color: var(--text-primary);
}

/* Эффект подчеркивания при наведении для ссылок в футере */
.page-footer a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width 0.3s ease;
}

.page-footer a:hover::after {
    width: 100%;
}