
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    padding: 100px 15px 50px;
}

.auth-form {
    width: 100%;
    max-width: 450px;
    padding: 40px;
    background-color: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-secondary);
    box-shadow: 0 10px 40px var(--shadow-color);
    position: relative;
    animation: slideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: border-color 0.3s ease, transform 0.2s ease, background-color 0.3s ease;
}

.auth-form:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 15px 50px var(--shadow-color);
}

.auth-title {
    text-align: center;
    margin-bottom: 35px;
    color: var(--text-hover);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.auth-field {
    margin-bottom: 20px;
    position: relative;
}

.auth-input {
    width: 100%;
    padding: 14px 18px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.auth-input::placeholder {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.auth-input:hover {
    border-color: var(--border-hover);
    background-color: var(--bg-secondary);
}

.auth-input:focus {
    border-color: var(--border-hover);
    background-color: var(--bg-secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 74, 74, 0.15);
}

[data-theme="light"] .auth-input:focus {
    box-shadow: 0 0 0 3px rgba(200, 200, 200, 0.3);
}

.auth-input:focus::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.auth-button {
    width: 100%;
    padding: 14px;
    background-color: var(--bg-hover);
    color: var(--text-hover);
    border: 1px solid var(--border-hover);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.auth-button:hover {
    background-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.auth-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px var(--shadow-light);
}

.auth-button:focus {
    outline: 2px solid var(--border-hover);
    outline-offset: 2px;
}

.auth-link {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-link a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.auth-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-secondary);
    transition: width 0.3s ease;
}

.auth-link a:hover {
    color: var(--text-hover);
}

.auth-link a:hover::after {
    width: 100%;
    background-color: var(--text-hover);
}

.auth-message {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.4s ease;
}

.auth-error {
    background-color: rgba(220, 38, 38, 0.1);
    color: #ff8080;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

[data-theme="light"] .auth-error {
    background-color: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.auth-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #80ff80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

[data-theme="light"] .auth-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

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

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

.auth-input:invalid:not(:placeholder-shown) {
    border-color: rgba(220, 38, 38, 0.5);
}

.auth-input:valid:not(:placeholder-shown) {
    border-color: rgba(34, 197, 94, 0.5);
}

@media (max-width: 768px) {
    .auth-container {
        padding: 80px 15px 30px;
        min-height: 70vh;
    }

    .auth-form {
        padding: 35px 30px;
        max-width: 100%;
    }

    .auth-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .auth-input {
        padding: 13px 16px;
        font-size: 15px;
    }

    .auth-button {
        padding: 13px;
        font-size: 15px;
    }

    .auth-field {
        margin-bottom: 18px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 60px 10px 20px;
    }

    .auth-form {
        padding: 25px 20px;
        border-radius: 10px;
    }

    .auth-title {
        font-size: 22px;
        margin-bottom: 25px;
    }

    .auth-field {
        margin-bottom: 16px;
    }

    .auth-input {
        padding: 12px 15px;
        font-size: 14px;
    }

    .auth-button {
        padding: 12px;
        font-size: 15px;
    }

    .auth-link {
        font-size: 13px;
        margin-top: 20px;
    }
}

/* Добавьте эти стили в ваш auth.css, если их там нет */

/* Субтитры */
.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
    font-size: 15px;
}

/* Сообщения об успехе */
.auth-message.auth-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--accent-green, #10b981);
    color: var(--accent-green, #10b981);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: block;
}

/* Сообщения об ошибке */
.auth-message.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--accent-red, #ef4444);
    color: var(--accent-red, #ef4444);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: block;
}

/* Анимация встряхивания для ошибок */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Стили для индикатора силы пароля */
#passwordStrength {
    margin-bottom: 16px;
}

#strengthBar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

#strengthText {
    font-size: 12px;
    margin-top: 4px;
    display: block;
    font-weight: 500;
}

/* Улучшенные стили для полей ввода */
.auth-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
}

.auth-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-input::placeholder {
    color: var(--text-muted);
}

/* Disabled состояние для кнопок */
.auth-button:disabled,
.resend-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Small текст под инпутами */
.auth-field small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Анимация появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-message {
    animation: fadeIn 0.3s ease;
}

/* Плавное скрытие */
.auth-message[style*="opacity: 0"] {
    transition: opacity 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    .auth-form,
    .auth-input,
    .auth-button,
    .auth-link a,
    .auth-message {
        animation: none;
        transition: none;
    }
}

.auth-button:focus-visible,
.auth-input:focus-visible,
.auth-link a:focus-visible {
    outline: 2px solid var(--border-hover);
    outline-offset: 2px;
}

        /* Оверлей для верификации */
        .verification-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--overlay-bg);
            backdrop-filter: blur(8px);
            z-index: 9999;
            justify-content: center;
            align-items: center;
            animation: fadeIn 0.3s ease;
        }

        .verification-overlay.active {
            display: flex;
        }

        .verification-modal {
            background: var(--bg-tertiary);
            border: 1px solid var(--border-secondary);
            border-radius: 16px;
            padding: 40px;
            max-width: 450px;
            width: 90%;
            box-shadow: 0 20px 60px var(--shadow-color);
            animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            position: relative;
        }

        .verification-modal h3 {
            color: var(--text-hover);
            font-size: 24px;
            font-weight: 600;
            margin-bottom: 12px;
            text-align: center;
        }

        .verification-modal p {
            color: var(--text-muted);
            font-size: 14px;
            text-align: center;
            margin-bottom: 30px;
            line-height: 1.6;
        }

        .verification-modal .email-display {
            color: var(--text-secondary);
            font-weight: 500;
        }

        .code-input-container {
            display: flex;
            gap: 12px;
            justify-content: center;
            margin-bottom: 24px;
        }

        .code-digit {
            width: 50px;
            height: 60px;
            font-size: 24px;
            font-weight: 600;
            text-align: center;
            background: var(--bg-primary);
            border: 2px solid var(--border-secondary);
            border-radius: 10px;
            color: var(--text-primary);
            transition: all 0.3s ease;
            caret-color: var(--text-hover);
        }

        .code-digit:focus {
            outline: none;
            border-color: var(--border-hover);
            background: var(--bg-secondary);
            box-shadow: 0 0 0 3px rgba(74, 74, 74, 0.15);
            transform: scale(1.05);
        }

        [data-theme="light"] .code-digit:focus {
            box-shadow: 0 0 0 3px rgba(200, 200, 200, 0.3);
        }

        .code-digit.filled {
            border-color: var(--accent-blue);
            background: var(--accent-blue-light);
        }

        .code-digit.error {
            border-color: var(--accent-red);
            background: var(--accent-red-light);
            animation: shake 0.5s ease;
        }

        .verification-message {
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            text-align: center;
            margin-bottom: 20px;
            animation: slideDown 0.4s ease;
        }

        .verification-message.error {
            background: var(--accent-red-light);
            color: var(--accent-red);
            border: 1px solid var(--accent-red);
        }

        .verification-message.success {
            background: var(--accent-green-light);
            color: var(--accent-green);
            border: 1px solid var(--accent-green);
        }

        .verification-actions {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .verify-button {
            width: 100%;
            padding: 14px;
            background: var(--bg-hover);
            color: var(--text-hover);
            border: 1px solid var(--border-hover);
            border-radius: 8px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .verify-button:hover:not(:disabled) {
            background: var(--border-hover);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px var(--shadow-color);
        }

        .verify-button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .verify-button.loading {
            position: relative;
            color: transparent;
        }

        .verify-button.loading::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 20px;
            height: 20px;
            margin: -10px 0 0 -10px;
            border: 2px solid transparent;
            border-top-color: var(--text-hover);
            border-radius: 50%;
            animation: spin 0.6s linear infinite;
        }

        .resend-link {
            text-align: center;
            color: var(--text-muted);
            font-size: 14px;
            margin-top: 16px;
        }

        .resend-link button {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-weight: 500;
            cursor: pointer;
            text-decoration: underline;
            transition: color 0.3s ease;
            padding: 0;
        }

        .resend-link button:hover:not(:disabled) {
            color: var(--text-hover);
        }

        .resend-link button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .timer {
            color: var(--text-muted);
            font-size: 13px;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

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

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-10px); }
            75% { transform: translateX(10px); }
        }

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

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

        @media (max-width: 480px) {
            .verification-modal {
                padding: 30px 20px;
            }

            .code-digit {
                width: 45px;
                height: 55px;
                font-size: 20px;
            }

            .code-input-container {
                gap: 8px;
            }
        }

