/* 用户认证系统动画样式 */

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

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

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

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

/* 认证消息样式 */
.auth-message {
    animation: slideInRight 0.3s ease-out;
}

.auth-message--removing {
    animation: slideOutRight 0.3s ease-out forwards;
}

.auth-message__content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-message__icon {
    flex-shrink: 0;
    font-size: 16px;
}

.auth-message__text {
    flex: 1;
    line-height: 1.4;
}

.auth-message__close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    opacity: 0.6;
    padding: 0;
    margin: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.auth-message__close:hover {
    opacity: 1;
}

/* 加载动画 */
.auth-loading-overlay {
    animation: fadeIn 0.2s ease-out;
}

.auth-loading-spinner {
    animation: spin 1s linear infinite;
}

/* 模态框动画 */
.modal {
    animation: fadeIn 0.3s ease-out;
}

.modal.closing {
    animation: fadeOut 0.3s ease-out forwards;
}

/* 用户菜单动画 */
.user-menu {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top right;
}

.user-menu.show {
    animation: fadeIn 0.2s ease-out;
}

/* 按钮悬停效果 */
.auth-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

/* 表单输入框焦点效果 */
.auth-input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-input:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 响应式调整 */
@media (max-width: 480px) {
    .auth-message {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
    }
}
